-
Type: Task
-
Status: Open (View Workflow)
-
Priority: Normal
-
Resolution: Unresolved
-
Component/s: ics_gen2Actor
-
Story Points:1
INSTRM-1367 requested header card searches in obslog. That was implemented by adding opdb tables, along with an inserter function.
When we request PFSx file archiving, add the headers. Just PHDU for now.
Sample code was:
import opdb.obslog import astropy.io.fits as pyfits from opdb.models import pfs_visit db = SessionClass() pfs_visit_id = 66453 filestem = 'PFSA06645311' hdul = pyfits.HDUList([ pyfits.PrimaryHDU(header=pyfits.Header([ ('PI', 3.14, "ratio of a circle's circumference to its diameter"), ])), ]) db.add_all(opdb.obslog.fits_headers_from_hdulist(hdul, pfs_visit_id, filestem): db.commit()