Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a DummyGridder for use with Vector #153

Open
leouieda opened this issue Dec 4, 2018 · 0 comments
Open

Create a DummyGridder for use with Vector #153

leouieda opened this issue Dec 4, 2018 · 0 comments
Labels
enhancement Idea or request for a new feature

Comments

@leouieda
Copy link
Member

leouieda commented Dec 4, 2018

Description of the desired feature

The Vector class allows us to compose a multi-component gridder from scalar gridders (like gridding a 3D vector with 3 Spline instances). We can also use this to make a multi-component Trend and use it in a Chain. But sometimes we want to fit trends to some components and not others but still have a muilt-component Chain. Currently, there is no way of doing this. A way around would be to have a DummyGridder class that implements the gridder API but does nothing with the data. It's fit method should do nothing, predict should return an array of zeros, and filter should just return whatever inputs it got. Then we can do this:

components = (data.east, data.north, data.up)
# Only use a Trend for the East and North components
spline = vd.Chain([
    ("trend", vd.Vector([vd.Trend(degree=1), vd.Trend(degree=1), vd.DummyGridder()])),
    ("spline", vd.Vector([vd.Spline() for i in range(3)])),
])
spline.fit(coordinates, components)
@leouieda leouieda changed the title Have a DummyGridder for use with Vector Create a DummyGridder for use with Vector Dec 4, 2018
@leouieda leouieda added enhancement Idea or request for a new feature help wanted labels Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea or request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant