Skip to content

binaryfile returns a nan array if totim not found #8

Closed
@langevin-usgs

Description

Email from Jeremy White identifying the problem and possible solutions:

Looks like the problem is that there are not entries in the hds file for totim == 1.0. If you use the binaryfile.HeadFile.list_records() method, you can see that the first (and only) totim is 10,000.0.

Now, the reason that mfbinaryfile works is that it searches through the listed totims in file until it finds a totim that is greater than or equal to the requested totim. binaryfile doesn't do that, it requires an exact match for the requested totim.

Chris - we should probably do something about this. To me, the options are:

1.) replicate the user-friendly (but could-be-dangerous) way the mfbinaryfile does it. Maybe we could issue warning if an exact match isn't found

2.) raise an exception if the totim isn't found.

I'm leaning towards 1 because it seems to be the most friendly.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions