DASDAE / dascore

A python library for distributed fiber optic sensing
Other
72 stars 16 forks source link

fixed time origin on o1 for RSF writer and made dummy starttime variable #344

Closed aaronjgirard closed 7 months ago

aaronjgirard commented 7 months ago

Description

For ease of readability by Madagascar, the RSF writer has now been modified to output o1=0.0 A dummy variable with the real start time called 'starttime' is placed in the RSF header. At a later date when an RSF reader is created, that dummy variable can be used.

Checklist

I have (if applicable):

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2fd62c7) 99.53% compared to head (e56ee02) 99.53%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #344 +/- ## ======================================= Coverage 99.53% 99.53% ======================================= Files 91 91 Lines 7242 7245 +3 ======================================= + Hits 7208 7211 +3 Misses 34 34 ``` | [Flag](https://app.codecov.io/gh/DASDAE/dascore/pull/344/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DASDAE) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/DASDAE/dascore/pull/344/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DASDAE) | `99.53% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DASDAE#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

aaronjgirard commented 7 months ago

OK yes that is fair I will reëvaluate how this should be done. Thanks for the eyes on it.

Aaron Girard

On Tue, Jan 30, 2024, 19:35 Derrick Chambers @.***> wrote:

@.**** commented on this pull request.

In dascore/io/rsf/core.py https://github.com/DASDAE/dascore/pull/344#discussion_r1472235881:

  • if i == 0:
  • hdr_info.append(f"o{i+1}=0.0")
  • hdr_info.append(f"starttime={axis_origs[i]}")
  • else:
  • hdr_info.append(f"o{i+1}={axis_origs[i]}")

I don't think we guarantee that the 0th axis is time here. Maybe:

if axis_names[i] == "time"

would be a better condition?

— Reply to this email directly, view it on GitHub https://github.com/DASDAE/dascore/pull/344#pullrequestreview-1852791655, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEX7T3YH32WFFR4WN6H6QF3YRGUWXAVCNFSM6AAAAABCSBGQOSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNJSG44TCNRVGU . You are receiving this because you authored the thread.Message ID: @.***>