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

Make missing header keywords not cause crashes #17

Open
Nat1405 opened this issue Jun 3, 2020 · 1 comment
Open

Make missing header keywords not cause crashes #17

Nat1405 opened this issue Jun 3, 2020 · 1 comment

Comments

@Nat1405
Copy link
Owner

Nat1405 commented Jun 3, 2020

Files with missing FITS header keywords are causing crashes in Nifty.

I see two possible solutions so far:

  • Skip downloads of any files with a "-md!" extension in the gemini archive
  • Add robustness to Nifty itself and hope for the best.

Link to example program with affected files: https://archive.gemini.edu/searchform/not_site_monitoring/NotFail/cols=CTOWEQ/GN-2006B-Q-26/notengineering

@Nat1405
Copy link
Owner Author

Nat1405 commented Jun 4, 2020

Looks like we can use the Gemini JSON queries to check for these sorts of files.

In GN-2019A-Q-208, N20190303S0069.fits has an -md! extension added. The JSON for it retrieved from this link looks like this for that entry:

   {
        "name": "N20190303S0069.fits",
        "filename": "N20190303S0069.fits.bz2",
        "path": "",
        "compressed": true,
        "file_size": 4104399,
        "data_size": 16807680,
        "file_md5": "7b012638397c33f765b1afd19365cff9",
        "data_md5": "ea80592e78b42ef0e22a84095e464827",
        "lastmod": "2019-12-18 18:02:14.686616+00:00",
        "mdready": false,
        "entrytime": "2019-12-18 18:02:14.707005+00:00",
        "size": 4104399,
        "md5": "7b012638397c33f765b1afd19365cff9",
        "program_id": "GN-2019A-Q-208",
        "engineering": false,
        "science_verification": false,
        "calibration_program": false,
        "observation_id": "GN-2019A-Q-208-101",
        "data_label": "GN-2019A-Q-208-101-001",
        "telescope": "Gemini-North",
        "instrument": "NIFS",
        "ut_datetime": "2019-03-03 07:48:31.900000",
        "local_time": "21:48:31.400000",
        "observation_type": "OBJECT",
        "observation_class": "science",
        "object": "LkHa313B",
        "ra": 86.825960987167,
        "dec": -0.042956990851,
        "azimuth": -115.4491375,
        "elevation": 50.080591666667,
        "cass_rotator_pa": -148.008664871338,
        "airmass": 1.313,
        "filter_name": "INVALID",
        "exposure_time": 250.0,
        "disperser": "J",
        "camera": "NIFS",
        "central_wavelength": 1.25,
        "wavelength_band": "J",
        "focal_plane_mask": "3.0_Mask",
        "detector_binning": "1x1",
        "detector_gain_setting": null,
        "detector_roi_setting": "Fixed",
        "detector_readspeed_setting": null,
        "detector_welldepth_setting": null,
        "detector_readmode_setting": "Medium_Object",
        "spectroscopy": true,
        "mode": "IFS",
        "adaptive_optics": false,
        "laser_guide_star": false,
        "wavefront_sensor": "PWFS2",
        "gcal_lamp": null,
        "raw_iq": 85,
        "raw_cc": 50,
        "raw_wv": 20,
        "raw_bg": 20,
        "requested_iq": 85,
        "requested_cc": 50,
        "requested_wv": 100,
        "requested_bg": 100,
        "qa_state": "Usable",
        "release": "2020-03-03",
        "reduction": "RAW",
        "types": "{'SPECT', 'RAW', 'NIFS', 'IFU', 'SIDEREAL', 'UNPREPARED', 'GEMINI', 'NORTH'}",
        "phot_standard": null
    },

The "mdready" attribute seems to only be false when there's an -md! extension added to the file in the archive.

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

1 participant