Open SharonGoliath opened 6 years ago
From PD: The Interval class should have such a constraint but I do not see any reason for the validation of SpatialWCS to make use of that class as Interval is a 1-D concept and thus not applicable. So it looks like a design flaw/bug in the python wcsvalidator
The observation id Cdemo_ext2_SCIRED raises the following exception during python validation:
caom2utils.wcsvalidator.InvalidWCSError: “Invalid SpatialWCS: AssertionError(‘Interval: attempt to set upper < lower for 1718.5, 1757.5’,): SpatialWCS.axis : CoordAxis2D.axis1 : Axis.ctype : RA---TAN Axis.cunit : deg CoordAxis2D.axis2 : Axis.ctype : DEC--TAN Axis.cunit : deg CoordAxis2D.error1 : None CoordAxis2D.error2 : None CoordAxis2D.range : None CoordAxis2D.bounds : None CoordAxis2D.function : CoordFunction2D.dimension : Dimension2D.naxis1 : 3515 Dimension2D.naxis2 : 3437 CoordFunction2D.ref_coord : Coord2D.coord1 : RefCoord.pix : 1755.0 RefCoord.val : 183.958190918 Coord2D.coord2 : RefCoord.pix : 1718.0 RefCoord.val : 36.3876953125 CoordFunction2D.cd11 : -0.000247563642915 CoordFunction2D.cd12 : 5.00967780681e-06 CoordFunction2D.cd21 : 5.07946242578e-06 CoordFunction2D.cd22 : 0.000247790361755 SpatialWCS.coordsys : ICRS SpatialWCS.equinox : 2000.0 SpatialWCS.resolution : None”
If I turn the python validation off, and use caom2-repo create to directly put to sc2.canfar.net/sc2repo, the same xml results in a record with no issues.