Open SharonGoliath opened 4 years ago
Negative time delta is an additional case of validation inconsistency e.g. ad:CFHT/11Bm04.flat.u.36.00.fits.fz:
2020-06-01 23:47:02,482:ERROR:root :3993:'Invalid Temporal WCS: ValueError("Invalid function in Temporal WCS: ValueError(\'CoordFunction1D.naxis : 1\\nCoordFunction1D.delta : -23.0\\nCoordFunction1D.ref_coord : RefCoord.pix : 0.5\\nRefCoord.val : 55959.0 delta must be greater than 0.0\')"): TemporalWCS.axis : CoordAxis1D.axis : Axis.ctype : TIME\nAxis.cunit : d\nCoordAxis1D.error : CoordError.syser : 1e-07\nCoordError.rnder : 1e-07\nCoordAxis1D.range : None\nCoordAxis1D.bounds : None\nCoordAxis1D.function : CoordFunction1D.naxis : 1\nCoordFunction1D.delta : -23.0\nCoordFunction1D.ref_coord : RefCoord.pix : 0.5\nRefCoord.val : 55959.0\nTemporalWCS.timesys : UTC\nTemporalWCS.trefpos : None\nTemporalWCS.mjdref : None\nTemporalWCS.exposure : 1.132\nTemporalWCS.resolution : 1.132' 2020-06-01 23:47:02,483:ERROR:root :3995:Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/caom2utils/fits2caom2.py", line 3991, in _augment validate(obs) File "/usr/local/lib/python3.8/site-packages/caom2utils/caomvalidator.py", line 103, in validate _validate_observation(caom2_entity, deep) File "/usr/local/lib/python3.8/site-packages/caom2utils/caomvalidator.py", line 140, in _validate_observation _validate_plane(plane) File "/usr/local/lib/python3.8/site-packages/caom2utils/caomvalidator.py", line 162, in _validate_plane _validate_artifact(artifact) File "/usr/local/lib/python3.8/site-packages/caom2utils/caomvalidator.py", line 177, in _validate_artifact _validate_part(value) File "/usr/local/lib/python3.8/site-packages/caom2utils/caomvalidator.py", line 192, in _validate_part _validate_chunk(chunk) File "/usr/local/lib/python3.8/site-packages/caom2utils/caomvalidator.py", line 205, in _validate_chunk validate_wcs(caom2_entity) File "/usr/local/lib/python3.8/site-packages/caom2utils/wcsvalidator.py", line 116, in validate_wcs _validate_chunk(caom2_entity) File "/usr/local/lib/python3.8/site-packages/caom2utils/wcsvalidator.py", line 155, in _validate_chunk _validate_temporal_wcs(chunk.time) File "/usr/local/lib/python3.8/site-packages/caom2utils/wcsvalidator.py", line 260, in _validate_temporal_wcs raise InvalidWCSError( caom2utils.wcsvalidator.InvalidWCSError: 'Invalid Temporal WCS: ValueError("Invalid function in Temporal WCS: ValueError(\'CoordFunction1D.naxis : 1\\nCoordFunction1D.delta : -23.0\\nCoordFunction1D.ref_coord : RefCoord.pix : 0.5\\nRefCoord.val : 55959.0 delta must be greater than 0.0\')"): TemporalWCS.axis : CoordAxis1D.axis : Axis.ctype : TIME\nAxis.cunit : d\nCoordAxis1D.error : CoordError.syser : 1e-07\nCoordError.rnder : 1e-07\nCoordAxis1D.range : None\nCoordAxis1D.bounds : None\nCoordAxis1D.function : CoordFunction1D.naxis : 1\nCoordFunction1D.delta : -23.0\nCoordFunction1D.ref_coord : RefCoord.pix : 0.5\nRefCoord.val : 55959.0\nTemporalWCS.timesys : UTC\nTemporalWCS.trefpos : None\nTemporalWCS.mjdref : None\nTemporalWCS.exposure : 1.132\nTemporalWCS.resolution : 1.132'
where-as a direct write to /sc2repo succeeds.
Get a test observation by:
caom2-repo read --cert $HOME/.ssl/cadcproxy.pem GEMINI GS-2019A-Q-404-122-015 > GS-2019A-Q-404-122-015.xml
Try to store that same xml to sc2repo, which has the latest version of the service WCS validation:
Try to validate that same xml with the python wcsvalidator module:
Should the python and the service have generally the same failure modes?