Skip to content

Problem with timeseries2velocity when excluding dates and outputting residuals #739

@olliestephenson

Description

@olliestephenson

Description of the problem

When running timeseries2velocity.py with both --save-res and --exclude parameters, we have an issue with the resulting residuals output.

At L.483 we layout an hdf file for saving the residuals, however we use the original timeseries file as the reference file. This creates an hdf file with the full number of dates, not taking into account the excluded dates. At L.700 when we write to this file, we only write residuals for 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.

I believe a straightforward solution to this would be to pass the shape of the timeseries with the excluded dates removed to layout_hdf5 via the ds_name_dict argument, rather than just passing the ref_file. I think we'd also have to pass the metadata from the original timeseries file, although I'm not sure if I'm missing some aspect of the data structure here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions