astromatic/scamp

*Error*: incorrect linear conversion in TAN

brooksvb opened this issue · 1 comments

I've been trying to get Photometry Pipeline working for an astronomer (I am just in IT) but I've hit an issue while testing the installation with example data.

When running the pipeline, it seems that scamp fails to create an output file. I've traced down that this is the command being ran:
scamp -c ~/photometrypipeline/setup/vatt4k.scamp -ASTR_FLAGSMASK 0x00fc -FLAGS_MASK 0x00fc -ASTREF_CATALOG FILE -ASTREFCAT_NAME GAIA.cat mscience0218.ldac

Running this command on it's own produces the output seen below (same as when ran with PP). I believe the convert: missing required argument error is the cause of the issue, but I've tried to dig into the code and cannot find reference to this conversion. Any help or guidance is greatly appreciated.

Link to the conf file being used: https://github.com/mommermi/photometrypipeline/blob/master/setup/vatt4k.scamp

> WARNING: FGROUP_RADIUS keyword unknown
 
 
> WARNING: Obsolete configuration; replacing cocat1.u-strasbg.fr with vizier.u-strasbg.fr
 
convert: missing required argument  @ error/convert.c/ConvertImageCommand/565.
----- SCAMP 2.10.0 started on 2023-11-20 at 11:34:28 with 8 threads
 
----- 1 input:
mscience0218.ldac:  "3552               "  no ext. header   1 set     234 detections
 
----- 234 detections loaded
> 
----- 1 instrument found for astrometry:
 
Instrument A1 :
1 extension
FILTER  = 'TOP 2 BOT 1'                                                         
QRUNID  =                                                                       
 
----- 1 instrument found for photometry:
 
Instrument P1 :
FILTER  = 'TOP 2 BOT 1'                                                         
 
----- 1 field group found:
 
 Group  1: 1 field at 11:58:07.99 +00:19:56.7 with radius 8.985'
                  instruments  epoch      center coordinates     radius   scale 
mscience0218.ldac    A1  P1    2017.1  11:58:07.99 +00:19:56.7   8.985'  0.3750"
 
----- Reference catalogs:
 
> Loading Catalog GAIA.cat...
> WARNING: FLAGS parameter not found in catalog GAIA.cat
 
 654 astrometric references loaded from GAIA.cat
 Group  1:      654 standards found in file (1 band)
 
----- Astrometric matching:
 
 Group  1:      654 standards in file (band 1)
              instruments  pos.angle   scale    cont.        shift        cont.
mscience0218.ldac  A1  P1    nan deg   0.000"   10.4 +2.9e+34"+3.6e+34"   9.35
 
chealpix.c, 858 (ang2pix_nest64):fications in group 1
theta out of range

I think I've determined that the convert: ... message is actually not relevant. It seems to come from this code:

/* Deactivate antialiasing if the convert tool is not available */
  if (prefs.cplot_flag && prefs.cplot_antialiasflag)
    {
    if ((testfile=popen("convert", "r")))
      {
      fgets(teststr, 80, testfile);
      if (!strstr(teststr, "ImageMagick"))
        prefs.cplot_antialiasflag = 0;
      pclose(testfile);
      }
    else
      prefs.cplot_antialiasflag = 0;
    }

which is just running the command and checking the output to identify if the command exists; the output that gets printed is because it goes to stderr which is not captured by scamp.

Here is output of running the software on data the astronomer has previously been able to process when the program was working before:

$ pp_register *fit* -cat GAIA
* extract sources from 2 frames
1381 sources extracted from frame lmi.0096.fits
1405 sources extracted from frame lmi.0097.fits
query Vizier for GAIA at  25.931/-4.096 in a 0.64 deg radius 1414 sources retrieved.
 
> WARNING: FGROUP_RADIUS keyword unknown
 
 
> WARNING: Obsolete configuration; replacing cocat1.u-strasbg.fr with vizier.u-strasbg.fr
 
convert: missing required argument  @ error/convert.c/ConvertImageCommand/565.
----- SCAMP 2.10.0 started on 2023-11-21 at 11:15:55 with 8 threads
 
----- 2 inputs:
lmi.0096.ldac:  "2003_SQ317         "  no ext. header   1 set    1130 detections
lmi.0097.ldac:  "2003_SQ317         "  no ext. header   1 set    1122 detections
 
----- 2252 detections loaded
> 
----- 1 instrument found for astrometry:
 
Instrument A1 :
1 extension
FILTER  = 'VR      '                                                            
QRUNID  =                                                                       
 
----- 1 instrument found for photometry:
 
Instrument P1 :
FILTER  = 'VR      '                                                            
 
----- 1 field group found:
 
 Group  1: 2 fields at 01:43:42.20 -04:05:46.0 with radius 8.802'
                  instruments  epoch      center coordinates     radius   scale 
lmi.0096.ldac        A1  P1    2023.8  01:43:42.20 -04:05:46.0   8.801'  0.3596"
lmi.0097.ldac        A1  P1    2023.8  01:43:42.20 -04:05:46.0   8.799'  0.3596"
 
----- Reference catalogs:
 
> Loading Catalog GAIA.cat...
> WARNING: FLAGS parameter not found in catalog GAIA.cat
 
 180 astrometric references loaded from GAIA.cat
 Group  1:      180 standards found in file (1 band)
 
----- Astrometric matching:
 
 Group  1:      180 standards in file (band 1)
              instruments  pos.angle   scale    cont.        shift        cont.
lmi.0096.ldac      A1  P1  -0.00 deg  0.3596"   1.86   +0.018"  +0.025"   3.39
 
> *Error*: incorrect linear conversion in TAN
 
 
################################# REGISTRATION SUMMARY:
###
### 0/2 images have been registered successfully
###
######################################################
 
ERROR: registration failed for all images

The astronomer said they have never seen the *Error*: incorrect linear conversion in TAN message before.