Menu

astap producing problematic .wcs file

2020-11-17
2020-11-18
  • Petros Pissias

    Petros Pissias - 2020-11-17

    Hi!
    First of all thanks for the amazing software :)
    I have detected some cases where astap does not create correctly a .wcs file
    The exert below is from a produced .wcs file:

    WARNING = 'Warning scale was inaccurate! Set FOV=0.76d, scale=2.5", FL=601mmStarCOMMENT cmdline:"C:\Users\Petros Pissias\Desktop\apps\astro\astap\astap.exe" -f COMMENT "C:\Users\Petros Pissias\Desktop\space\2020-08-17 eagle helix\LIGHT-EAGLCOMMENT E\reg\L_2020-08-17_22-08-38_Bin1x1_120s__10C.reg.fit" -r 360 -z 0 -fov 0COMMENT  -wcs -annotate                                                         END                         
    

    The issue seems to be that the single quote for the WARNING field is not closed.

    For reference I am using the nom.tam.fits Java library to read the .wcs header and I have the following exception:

    INFO: applying WCS header C:\Users\Petros Pissias\Desktop\space\2020-08-17 eagle helix\LIGHT-EAGLE\reg\L_2020-08-17_22-08-38_Bin1x1_120s__10C.reg.wcs to all images
    java.io.IOException: **Invalid FITS Header**
            at nom.tam.fits.Header.read(Header.java:1156)
            at nom.tam.fits.Header.readHeader(Header.java:149)
            at nom.tam.fits.Fits.readHDU(Fits.java:644)
            at nom.tam.fits.Fits.getHDU(Fits.java:491)
            at spv.util.ImagePreprocessing.applyWCSHeader(ImagePreprocessing.java:338)
            at spv.gui.SPMainApplicationPanel$1$1.run(SPMainApplicationPanel.java:147)
    Caused by: java.lang.IllegalArgumentException: **no single quotes allowed in values**
            at nom.tam.fits.HeaderCard.extractValueCommentFromString(HeaderCard.java:986)
            at nom.tam.fits.HeaderCard.<init>(HeaderCard.java:397)
            at nom.tam.fits.Header.read(Header.java:1118)
            ... 5 more
    

    which seems to go away when I close manually the single quote before the next COMMENT.

    Thanks again,
    Petros

     
    • han.k

      han.k - 2020-11-17

      Hello Petros,

      The default wcs output by ASTAP is not conform the FITS standard. It is written as a text file with carriage return & line feed. Also the line length is not limited to 80 bytes. This was a simplification which was later corrected by adding the command-line option -wcs This option was chosen not to break the existing behavior.

      Could you try to test it with -wcs option added?

      Han

       
  • Petros Pissias

    Petros Pissias - 2020-11-17

    Hi Han,

    thanks for your reply,

    this was indeed run with the -wcs option, the command was (taken form the COMMENT elements of the generated wcs file)

    cmdline:"C:\Users\Petros Pissias\Desktop\apps\astro\astap\astap.exe" -f "C:\Users\Petros Pissias\Desktop\space\2020-08-17 eagle helix\LIGHT-EAGLE\reg\L_2020-08-17_22-08-38_Bin1x1_120s__10C.reg.fit" -r 360 -z 0 -fov 0 -wcs -annotate  
    

    I am attaching a generated .wcs file that has this problem that I just generated with a similar command.

    If you see this file, it has the issue I describe above with not closing the single quote on the WARNING element.

    WARNING = 'Warning scale was inaccurate! Set FOV=0.76d, scale=2.5", FL=600mmStarCOMMENT cmdline:"C:\Users\P ........
    

    Many thanks in advance,
    Petros

     
  • han.k

    han.k - 2020-11-17

    Okay problem clear. Will add a second single-quote=' at the end of the warning. The warning is too long for the total 80 bytes causing it to be lost. In the default .wcs text format it can be longer then 80 bytes.

     
  • Petros Pissias

    Petros Pissias - 2020-11-17

    Thanks Han,

    have a good day!

     
  • han.k

    han.k - 2020-11-17

    No problem feedback is important and helpful.

    I will solve it using the CONTINUE keyword. Maybe not all programs will except it but it is according the standard:

    WARNING = 'Warning scale was inaccurate! Set FOV=1.32d, scale=2.7", FL=581mm S&'
    CONTINUE= 'tar database limit was reached!'

    Clear skies, Han

     
  • han.k

    han.k - 2020-11-18

    Is fixed in version 0.9.450 just uploaded.
    Clear skies, Han

     
    • Petros Pissias

      Petros Pissias - 2020-11-18

      Thank you Han,

      Clear skies and thanks again for the amazing software.
      Petros

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.