Script to sync column descriptions
weaverba137 opened this issue · 9 comments
As part of @aureliocarnero's work on creating a central column definition list, once that work is done, we should create a script that will sync existing files with that list, with options to simply point out differences or to actually make changes to the files.
@aureliocarnero, could you give an update on your work to create a central column definition list?
(Aurelio is on paternity leave until the end of January.)
Hello. Thank you Ashley. Yes, @weaverba137 I will be on paternity leave until the end of January.
In any case, I can answer quickly in case is useful.
The day before the birth I committed an almost working version to a branch called autocolumndesc
The file with the description is under desidatamodel/doc/column_descriptions.csv
I did not have time to fill the units, in case someone wants to work from here, I would be happy. But the descriptions are all there.
Next, unfortunately I didnt have time to modifiy the stub.py file to read the column_description file and right now, it is still waiting to receive a fits file, instead of a csv. So if you are interested in pushing this forward as soon as possible, we just need to modify the line 262 in stub.py
(where it reads desc_data = fits.open(self.description_file)[1].data)
Actually, looking at the branch comparison between autocolumndesc and main, you will see the changes and how easy it is to modify it if you wish.
If not, I could make the changes and continue working with this in a few weeks.
Cheers
Aurelio
we will need to wait until the end of January. Maybe I could do it earlier myself, but I cannot promise it.
@aureliocarnero, this is very good to hear! We have a documentation sprint going on and there are other people interested in this same goal. This is a great start.
Here is a useful list of units used by desitarget that could be used as a starting point.
With the caveat that some of those units don't conform to the FITS standard. See the notes at the bottom of, e.g., this page which also contains a useful snippet of code for determining the FITS-compliant unit.
Yes, we did mention that to the people interested in this.
@sbailey has been working on some code related to this, so reassigning.
Closing because this script now exists as of #144.