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

How to set start/end time for run #188

Closed
kkappler opened this issue Jun 26, 2022 · 2 comments
Closed

How to set start/end time for run #188

kkappler opened this issue Jun 26, 2022 · 2 comments
Assignees

Comments

@kkappler
Copy link
Collaborator

kkappler commented Jun 26, 2022

When working with synthetic data, the default start time of a run is 1980-01-01T00:00:00+00:00

But if you want to tell mth5 that the run should start at a different time, how is that done?

Tried manually changing runts.run_metadata.time_period.start but no joy.

Example can be found in aurora/test_utils/synthetic/make_mth5_from_asc.py
create_test3_h5

I created a fix_issue_188 branch with a few things I was trying.

@kujaku11
Copy link
Collaborator

kujaku11 commented Jul 7, 2022

@kkappler I pushed a slight adjustment to making synthetic MTH5 files. There are a few things to keep in mind:

  • The runts metadata will overwrite any previous Run.metadata so setting the run start time is mute.
  • The run_group.metadata start and end time are dictated by the channel's start and end time, so if you want new start and end times you should do that at the channel level. I added that into 'create_run_ts_from_synthetic_run' so just change the start time in the aurora\test_utils\synthetic\synthetic_station_config.py
  • When overwriting metadata in an H5 group be sure to run the method write_metadata after the change so that it will be written to the MTH5.

Hopefully that helps

kkappler added a commit that referenced this issue Apr 7, 2023
In this commit is a hodgepodge of experiments aimed at setting the
start/end times in mt_metadata for the synthetic data.

Many lines are from the old fix_issue_188 branch which has not been
looked at in some time, and not all are needed.

These will be cleaned up in following commits

[Issue(s): #188]
kkappler added a commit that referenced this issue Apr 7, 2023
@kkappler
Copy link
Collaborator Author

kkappler commented Apr 7, 2023

This has been addressed on branch fix_issue_188_2

Deleting the old fix_issue_188 branch

@kkappler kkappler closed this as completed Apr 8, 2023
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

No branches or pull requests

2 participants