Show
added a comment - Tim, sorry it longer than I expected - it uncovered some interesting issues in lsst.log that we did not expect Should be ready for review, and I started Jenkins build to see how much it is going to break. ingestImages now produces messages like these:
root INFO: Loading config overrride file '/project/salnikov/gen3-middleware/obs_lsst/config/ingest.py'
root INFO: Loading config overrride file '/project/salnikov/gen3-middleware/obs_lsst/config/auxTel/ingest.py'
LsstCamMapper WARN: Unable to find valid calib root directory
CameraMapper INFO: Loading exposure registry from /project/salnikov/gen3-middleware/obs_lsst/DM-17530_repo/registry.sqlite3
astro_metadata_translator.observationInfo WARN: OrderedDict([('SIMPLE', True), ('BITPIX', 8), ('NAXIS', 0), ('EXTEND', True), ('ORIGIN', 'BNL'), ('DATE', '2016-07-21T02:17:33.872'), ('DATE-OBS', '2016-07-21T02:17:30.700'), ('MJD-OBS', 57590.09549421305), ('IMAGETAG', 'CCS'), ('TSTAND', 'BNL-TS3-2-Janeway'), ('INSTRUME', 'ArchonCCDController'), ('CONTROLL', 'ArchonCCDController'), ('CCD_MANU', 'ITL'), ('CCD_TYPE', 'STA3800C'), ('CCD_SERN', 'ITL-3800C-098'), ('LSST_NUM', 'ITL-3800C-098'), ('TESTTYPE', 'DARK'), ('IMGTYPE', 'BIAS'), ('SEQNUM', 0), ('TEMP_SET', -95.0), ('CCDTEMP', -94.58139), ('CCDBSS', -35.0), ('MONDIODE', -0.5529727999999999), ('MONOWL', -1.0), ('PIXRATE', 549.4505494505494), ('FILTER', '550CutOn'), ('FILTPOS', 3), ('EXPTIME', 0.0), ('CTLRCFG', 'bnl_STA_20160718_B.acf'), ('FILENAME', 'ITL-3800C-098_dark_bias_000_20160720221733.fits'), ('DETSIZE', '[1:4072,1:4000]'), ('BINX', 1), ('BINY', 1), ('HEADVER', 1), ('CCDGAIN', 4.5), ('CCDNOISE', 1.0), ('CFGFILE', 'bnl_STA_20160718_B.acf'), ('CTLRID', '23723640293011484'), ('CTLRRV', 3), ('CTLRTYP', 1), ('CTLRVER', '1.0.762'), ('MONOCH-WAVELENG', 500.015), ('MONOCH-SLIT_A', 210.0), ('MONOCH-SLIT_B', 210.0), ('MONOCH-SLIT_C', 0.0), ('MONOCH-BANDPASS', 0.0), ('MONOCH-FILT_1', 3.0), ('MONOCH-MSTEPS', 1200.0), ('MONOCH-GRATING', 1.0), ('AMP0-IDN', 'KEITHLEY-INSTRUMENTS-INC.,MODEL-6487'), ('AMP0-AZERO', 'F'), ('AMP0-COUNT', 440), ('AMP0-MEAS_NPLC', 1), ('AMP2-IDN', 'KEITHLEY-INSTRUMENTS-INC.,MODEL-6487'), ('AMP2-VOLTAGE', -35.0), ('AMP2-CURRENT', -117754.1), ('AMP2-ZERO_CHECK', 'off'), ('CHECKSUM', 'nmkBnmjBnmjBnmjB'), ('DATASUM', '0')])
astro_metadata_translator.observationInfo WARN: Error calculating property 'exposure_id' using translator <class 'lsst.obs.lsst.translators.auxTel.LsstAuxTelTranslator'>: 'DAYOBS'
astro_metadata_translator.observationInfo WARN: OrderedDict([('SIMPLE', True), ('BITPIX', 8), ('NAXIS', 0), ('EXTEND', True), ('ORIGIN', 'BNL'), ('DATE', '2016-07-21T02:17:33.872'), ('DATE-OBS', '2016-07-21T02:17:30.700'), ('MJD-OBS', 57590.09549421305), ('IMAGETAG', 'CCS'), ('TSTAND', 'BNL-TS3-2-Janeway'), ('INSTRUME', 'ArchonCCDController'), ('CONTROLL', 'ArchonCCDController'), ('CCD_MANU', 'ITL'), ('CCD_TYPE', 'STA3800C'), ('CCD_SERN', 'ITL-3800C-098'), ('LSST_NUM', 'ITL-3800C-098'), ('TESTTYPE', 'DARK'), ('IMGTYPE', 'BIAS'), ('SEQNUM', 0), ('TEMP_SET', -95.0), ('CCDTEMP', -94.58139), ('CCDBSS', -35.0), ('MONDIODE', -0.5529727999999999), ('MONOWL', -1.0), ('PIXRATE', 549.4505494505494), ('FILTER', '550CutOn'), ('FILTPOS', 3), ('EXPTIME', 0.0), ('CTLRCFG', 'bnl_STA_20160718_B.acf'), ('FILENAME', 'ITL-3800C-098_dark_bias_000_20160720221733.fits'), ('DETSIZE', '[1:4072,1:4000]'), ('BINX', 1), ('BINY', 1), ('HEADVER', 1), ('CCDGAIN', 4.5), ('CCDNOISE', 1.0), ('CFGFILE', 'bnl_STA_20160718_B.acf'), ('CTLRID', '23723640293011484'), ('CTLRRV', 3), ('CTLRTYP', 1), ('CTLRVER', '1.0.762'), ('MONOCH-WAVELENG', 500.015), ('MONOCH-SLIT_A', 210.0), ('MONOCH-SLIT_B', 210.0), ('MONOCH-SLIT_C', 0.0), ('MONOCH-BANDPASS', 0.0), ('MONOCH-FILT_1', 3.0), ('MONOCH-MSTEPS', 1200.0), ('MONOCH-GRATING', 1.0), ('AMP0-IDN', 'KEITHLEY-INSTRUMENTS-INC.,MODEL-6487'), ('AMP0-AZERO', 'F'), ('AMP0-COUNT', 440), ('AMP0-MEAS_NPLC', 1), ('AMP2-IDN', 'KEITHLEY-INSTRUMENTS-INC.,MODEL-6487'), ('AMP2-VOLTAGE', -35.0), ('AMP2-CURRENT', -117754.1), ('AMP2-ZERO_CHECK', 'off'), ('CHECKSUM', 'nmkBnmjBnmjBnmjB'), ('DATASUM', '0')])
astro_metadata_translator.observationInfo WARN: Error calculating property 'visit_id' using translator <class 'lsst.obs.lsst.translators.auxTel.LsstAuxTelTranslator'>: 'DAYOBS'
lsst.obs.lsst.translators.auxTel WARN: Unable to determine observation type. Guessing 'bias'
If you want to replace Task.log with a Python logger (which seems like the cleanest outcome) this will likely require some tweaking of existing tasks, as some methods are a bit different. For instance Python logging has no methods with "f" suffixes, e.g. infof, at least that I can find in the docs (though I doubt we are using those widely yet). I also expect some changes to unit tests and possibly bin scripts that adjust logging levels.
Still that does seem cleaner than trying to provide backwards compatibility with a new task attribute that holds a new style log.
I am willing to implement this change, or help with the implementation.