data-exchange / dxfile

Subclasses the h5py module for interacting with Data Exchange files.
http://dxfile.readthedocs.org/
Other
2 stars 8 forks source link

store time as ISO8601 #17

Open decarlof opened 4 years ago

decarlof commented 4 years ago

Currently we save time in the hdf data generated by areadetector using S:IOC:timeOfDayForm2SI:

caget S:IOC:timeOfDayForm2SI
S:IOC:timeOfDayForm2SI         06/08/20 16:07:14

but we should use ISO 8601 standard instead (see dxfile definition).

The change affects all Attribulte.xml files, replacing:

    <Attribute name="DateTimeStart"                 type="EPICS_PV"     source="S:IOC:timeOfDayForm1SI"                  dbrtype="DBR_STRING"  description="Date and time at start"/>
    <Attribute name="DateTimeEnd"                   type="EPICS_PV"     source="S:IOC:timeOfDayForm1SI"                  dbrtype="DBR_STRING"  description="Date and time at end"/>

with

    <Attribute name="DateTimeStart"                 type="EPICS_PV"     source="S:IOC:timeOfDayISO8601"                  dbrtype="DBR_STRING"  description="Date and time at start"/>
    <Attribute name="DateTimeEnd"                   type="EPICS_PV"     source="S:IOC:timeOfDayISO8601"                  dbrtype="DBR_STRING"  description="Date and time at end"/>

After this change the time will be saved as:

caget S:IOC:timeOfDayISO8601
S:IOC:timeOfDayISO8601         2020-06-08T15:59:06-0500

which is easier to manipulate and do math with.

Let me know if you agree with the change as it might break some tool using this tag.

decarlof commented 4 years ago

Another definition change is required to simplify the meta data reader (see discussion at data-exchange.

Currently we store "group name"/"name" example

"sample"/"name"
"experimenter"/"name" 

ending up with a many not unique "name" labels. The proposed change will rename

"group name"/"name" 

to

"group name"/"group name"_"name"

ex:

"sample"/"sample_name"
"experimenter"/"experimenter_name"

Let me know if you agree with the change as it might break some tool using these tags.