MWATelescope / Birli

A Rust library for preprocessing tasks in the Murchison Widefield Array (MWA) data pipeline.
Mozilla Public License 2.0
16 stars 3 forks source link

uvfits should have information about when it was created. #117

Open d3v-null opened 1 year ago

d3v-null commented 1 year ago

it is not possible to determine the date that a uvfits file was created without metadata from the filesystem. This metadata can be lost when transferring between filesystems like when uploading a file to acacia. It would be good to store the date a uvfits file was created in the header somewhere.

AIPS117 has a DATE-MAP field for this purpose. The marlu::context::History object could be extended to take an Option<Epoch> (defaults to SystemTime::now()) to facilitate this.

cjordan commented 1 year ago

I don't think that History should be extended; the uvfits writer should simply write the new key with the current time.

d3v-null commented 1 year ago

I see the History object as being useful for reading rows out of the HISTORY table in ms, but you're right that we don't need to break the existing api for this feature.

cjordan commented 1 year ago

Ah, I see. Currently Marlu doesn't do any vis reading, but if/when it does, I think it'd be sufficient to have a trait method that grabs the creation time. Probably also trait methods for getting the "command", "application" etc. seeing as History is currently just a little container only for writing.