Hello, I am using a newer version 24.0.0, when I ingest fits, the number of visits is more than that of exposures, for example, after I have ingest 2 files and run the command:
butler define-visits
The visits is more than exposures, and the output is:
lsst.obs.base.defineVisits INFO: Defaulting to searching for raw exposures in collection WFST/raw/all
lsst.defineVisits INFO: Preprocessing data IDs.
lsst.defineVisits INFO: Registering visit_system 2: by-seq-start-end.
lsst.defineVisits INFO: Registering visit_system 0: one-to-one.
lsst.defineVisits INFO: Grouping 2 exposure(s) into visits.
lsst.defineVisits INFO: Computing regions and other metadata for 3 visit(s).
In the gen3.sqlite3, there are a visit id named 92
which shouldn’t appear:
instrument id physical_filter name day_obs seq_num exposure_time target_name observation_reason science_program azimuth zenith_angle region timespan_begin timespan_end
WFST 92 WFST-G WFST00000020_first 20220427 0 30 9999 science 9999 0 90 cF1WkPk6A+q/ZUAg7kANmr/LX1Xvjp7iP3eEP0RWuOm/WKNeA+8Gmr/RGo+ifwXjP8snxQ/aa+m/R2YT2CeCmb/iNk1JbWvjP1bXE9isbem/05txgFUshL8V/3utkmzjP0W8VSkCbum/sNdTXLhNdz8V/3utkmzjP0VH88HUbOm/Dk72ias/lT/iNk1JbWvjPxCth0FWuem/5jnvj6G3lT/RGo+ifwXjPwwBVvc6BOq/k4m8DWexlT/LX1Xvjp7iP2+aIkvCT+q/gyT0wjmmlT8dqAO8OjPiP4cEpRINUeq/TIHmy6v3dj/HbkSOWjTiP+CkyiyoUOq/xByuUR9ZhL8DTu9ocDTiPz8TdjWETOq/elY3kpwOmr/zSRV6eDbiPw== 1651047067277000000 1651047097277000000
WFST 1 WFST-G WFST00000010 20220427 0 30 9999 science 9999 0 90 cFO7983kBeq/1kvtYEOxlb+Tg0O9O5ziPwk/WksJu+m/tgXRHX23lb/AsV8hMwPjP1lA0ueQbum/pHZ5VIY/lb/75KedJ2njPx7iamm+b+m/dd+XfSNNd7+C0ILfTGrjPy79KBhpb+m/2ZfP758shD+C0ILfTGrjP9ggpDWWbem/UT2QDU2CmT/85KedJ2njP2gWEk4Juum/ntd8dRMHmj/AsV8hMwPjP50QMtDkBOq/gH3vmmQNmj+Tg0O9O5ziP+8VaMBiUOq/dS35Mt4Omj/qYYnK4DDiP+Qh3DRYUuq/tiRFN6pNhD9r35p3ADLiPyKD/PydUuq/qTIRbqAOd791qKlTFjLiPxDXJ4kkT+q/x5RmVVimlb/oiem7HjTiPw== 1651047042024000000 1651047072024000000
WFST 2 WFST-G WFST00000020 20220427 0 60 9999 science 9999 0 90 cF1WkPk6A+q/ZUAg7kANmr/LX1Xvjp7iP3eEP0RWuOm/WKNeA+8Gmr/RGo+ifwXjP8snxQ/aa+m/R2YT2CeCmb/iNk1JbWvjP1bXE9isbem/05txgFUshL8V/3utkmzjP0W8VSkCbum/sNdTXLhNdz8V/3utkmzjP0VH88HUbOm/Dk72ias/lT/iNk1JbWvjPxCth0FWuem/5jnvj6G3lT/RGo+ifwXjPwwBVvc6BOq/k4m8DWexlT/LX1Xvjp7iP2+aIkvCT+q/gyT0wjmmlT8dqAO8OjPiP4cEpRINUeq/TIHmy6v3dj/HbkSOWjTiP+CkyiyoUOq/xByuUR9ZhL8DTu9ocDTiPz8TdjWETOq/elY3kpwOmr/zSRV6eDbiPw== 1651047042024000000 1651047097277000000
When I use the older version 23.0.1, this situation didn’t happen:
py.warnings WARNING: /home/yu/lsst_stack/23.0.1/stack/miniconda3-py38_4.9.2-0.8.1/Linux64/daf_butler/g6b22db343a+d18c45d440/python/lsst/daf/butler/registry/databases/sqlite.py:444: SAWarning: Class _Ensure will not make use of SQL compilation caching as it does not set the 'inherit_cache' attribute to ``True``. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Set this attribute to True if this object can make use of the cache key generated by the superclass. Alternatively, this attribute may be set to False which will disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf)
return connection.execute(_Ensure(table), rows).rowcount
defineVisits INFO: Defaulting to searching for raw exposures in collection WFST/raw/all
defineVisits INFO: Preprocessing data IDs.
defineVisits INFO: Registering visit_system 0: one-to-one.
defineVisits INFO: Grouping 2 exposure(s) into visits.
defineVisits INFO: Computing regions and other metadata for 2 visit(s).
And if I run the command butler define-visits
twice in version 24.0.0, the output is:
lsst.obs.base.defineVisits INFO: Defaulting to searching for raw exposures in collection WFST/raw/all
lsst.defineVisits INFO: Preprocessing data IDs.
lsst.defineVisits INFO: Registering visit_system 2: by-seq-start-end.
lsst.defineVisits INFO: Registering visit_system 0: one-to-one.
lsst.defineVisits INFO: Grouping 2 exposure(s) into visits.
lsst.defineVisits INFO: Computing regions and other metadata for 3 visit(s).
lsst.daf.butler.cli.utils ERROR: Caught an exception, details are in traceback:
Traceback (most recent call last):
File "/home/yu/lsst_stack/24.0.0/stack/miniconda3-py38_4.9.2-4.0.5/Linux64/obs_base/gbaa45dfa32+2718a75a08/python/lsst/obs/base/cli/cmd/commands.py", line 107, in define_visits
script.defineVisits(*args, **kwargs)
File "/home/yu/lsst_stack/24.0.0/stack/miniconda3-py38_4.9.2-4.0.5/Linux64/obs_base/gbaa45dfa32+2718a75a08/python/lsst/obs/base/script/defineVisits.py", line 95, in defineVisits
task.run(
File "/home/yu/lsst_stack/24.0.0/stack/miniconda3-py38_4.9.2-4.0.5/Linux64/obs_base/gbaa45dfa32+2718a75a08/python/lsst/obs/base/defineVisits.py", line 674, in run
inserted_or_updated = self.butler.registry.syncDimensionData(
File "/home/yu/lsst_stack/24.0.0/stack/miniconda3-py38_4.9.2-4.0.5/Linux64/daf_butler/gdde7253329+1ed234098f/python/lsst/daf/butler/registries/sql.py", line 797, in syncDimensionData
return storage.sync(record, update=update)
File "/home/yu/lsst_stack/24.0.0/stack/miniconda3-py38_4.9.2-4.0.5/Linux64/daf_butler/gdde7253329+1ed234098f/python/lsst/daf/butler/registry/dimensions/table.py", line 251, in sync
_, inserted_or_updated = self._db.sync(
File "/home/yu/lsst_stack/24.0.0/stack/miniconda3-py38_4.9.2-4.0.5/Linux64/daf_butler/gdde7253329+1ed234098f/python/lsst/daf/butler/registry/interfaces/_database.py", line 1325, in sync
raise DatabaseConflictError(
lsst.daf.butler.registry.interfaces._database.DatabaseConflictError: Conflict in sync for table visit on column(s) exposure_time: 60.0 != 30.0, timespan_begin: 1651047042024000000 != 1651047067277000000.
seems like there are something wrong with time, (it may read two different exposure time from one exposure?)
but the astrometadata -p
work well:
(lsst-scipipe-4.0.5) [yu@localhost mock_data]$ astrometadata -p wfst translate ./WFST00000010.fits
Analyzing ./WFST00000010.fits...
HDU 1 was not found in file ./WFST00000010.fits. Ignoring request.
instrument: WFST
telescope: WFST
datetime_begin: 2022-04-27T08:10:05.024
altaz_begin: <AltAz Coordinate (obstime=2022-04-27T08:10:05.024, location=(-339424.21484631, 4982414.0010383, 3960862.59046989) m, pressure=0.0 hPa, temperature=0.0 deg_C, relative_humidity=0.0, obswl=1.0 micron): (az, alt) in deg
(0., 0.)>
boresight_airmass: 1.0
boresight_rotation_angle: 0.0 deg
boresight_rotation_coord: sky
dark_time: 30.0 s
datetime_end: 2022-04-27T08:10:35.024
detector_exposure_id: 14
detector_group: 0
detector_name: 4
detector_num: 4
detector_serial: 4
detector_unique_name: 4
exposure_group: 1
exposure_id: 1
exposure_time: 30.0 s
focus_z: 0.0 mm
group_counter_end: 0
group_counter_start: 0
has_simulated_content: False
location: (-339424.21484631, 4982414.0010383, 3960862.59046989) m
object: 9999
observation_counter: 0
observation_id: WFST00000010
observation_reason: science
observation_type: science
observing_day: 20220427
physical_filter: WFST-G
pressure: 621.6 hPa
relative_humidity: 20.0
science_program: 9999
temperature: 20.0 deg_C
tracking_radec: <SkyCoord (ICRS): (ra, dec) in deg
(179.85, 35.99)>
visit_id: 1
I also test the HSC’s data, and the error didn’t happen, what may caused this?
Thank you!