Skip to content

bugfix: timeseries2velocity --save-res excluded dates#746

Merged
yunjunz merged 2 commits intoinsarlab:mainfrom
yuankailiu:dev.ts_residual
Feb 14, 2022
Merged

bugfix: timeseries2velocity --save-res excluded dates#746
yunjunz merged 2 commits intoinsarlab:mainfrom
yuankailiu:dev.ts_residual

Conversation

@yuankailiu
Copy link
Contributor

@yuankailiu yuankailiu commented Feb 14, 2022

A bugfix for issue #739, which was brought up by @olliestephenson.

When saving time-series residuals during timeseries2velocity.py, the code did not ignore the excluded dates. It writes residuals for all the dates we haven't excluded, leaving the final N date entries empty (where N is the number of dates we have excluded). This means that the residuals no longer line up with the correct dates.

Now the code instantiates the output time-series residual hdf5 file with the correct number of dates, accounting for the excluded dates.

This bugfix is a realization of the suggested solution from @olliestephenson, in which we pass the shape of the timeseries with the excluded dates removed to layout_hdf5 via the ds_name_dict argument.

Co-authored by @yunjunz

Description of proposed changes

Reminders

  • Fix Problem with timeseries2velocity when excluding dates and outputting residuals #739
  • Pass Codacy code review (green)
  • Pass Circle CI test (green)
  • Make sure that your code follows our style. Use the other functions/files as a basis.
  • If modifying functionality, describe changes to function behavior and arguments in a comment below the function declaration.
  • If adding new functionality, add a detailed description to the documentation and/or an example.

Save timeseries_res: instantiate the output hdf5 file accounting for the excluded dates
@yunjunz yunjunz self-requested a review February 14, 2022 19:33
Copy link
Member

@yunjunz yunjunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @yuankailiu. LGTM!

@yunjunz yunjunz merged commit 006f1f9 into insarlab:main Feb 14, 2022
@yuankailiu yuankailiu deleted the dev.ts_residual branch February 22, 2022 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with timeseries2velocity when excluding dates and outputting residuals

2 participants