Imcoadd, Gamosaic, GSAOI

Home Forums Gemini Data Reduction Imcoadd, Gamosaic, GSAOI

This topic contains 1 reply, has 2 voices, and was last updated by  Mark 6 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #737

    Daniela Opitz


    I stacked a set of 9 GSAOI images (reduced with the GSAOI pipeline) with IMCOADD (to get median fl_med=yes). I made it with each extension so I have med_ext_1.fits, med_ext_2.fits, med_ext_3.fits and med_ext_4.fits. Then I used WMEF to pack the extensions and get a file called mosaiced.fits. Now I want to mosaic this image with GAMOSAIC but I can’t. When a run gamosaic mosaiced.fits returns:

    GAMOSAIC: badpix value after checks is gsaoi$data/gsaoibpm_high_full.fits

    GAMOSAIC: Calling GAIMCHK to check input files…
    WARNING – GAIMCHK: “mosaiced.fits” is not a GSAOI image. Skipping this image
    ERROR – GAIMCHK: No input images pass first round of checks. Please try again.
    ERROR – GAMOSAIC: GAIMCHK returned a non-zero status. Exiting.

    GAMOSAIC — Exit status: ERROR
    — Please read the logfile “gsaoi1.log” for more information.

    Could you help me with this error please?

    Thanks a lot

    • This topic was modified 6 years, 3 months ago by  Daniela Opitz.


    Hi Daniela,

    I just noticed this post after responding to your HelpDesk ticket. For the benefit of other users I’ll note the fix that was determined here too.

    The input file (lets call it ‘img.fits’) to gamosaic had been created by first using imcoadd to combine each extension version from each image, resulting in 4 simple FITS files, one for each extension version. Then gemtools.wmef was used to create a MEF file containing the 4 combined image extensions.

    The reason why gamosaic (and gaimchk) fail was the result of missing keywords due the manipulation described above. gaimchk is used to confirm that the input images are from GSAOI and have the appropriate format etc., and it relies on header keywords to perform these checks.

    For the reported gamimchk issue, ‘INSTRUME’, ‘GAPREPAR’ and ‘NSCIEXT’, were required. To fix the remaining GAMOSAIC issue, the ‘METACONF’ (phu), and ‘EXTNAME’ and ‘EXTVER’ (image extensions) were added.

    Note the METACONF keyword value was copied from the PHU of one of the original input files to imcoadd (assuming the dimensions of the image extensions have not changed). The METACONF value must be correct as GAMOSAIC uses it to determine the ROI used.

    Running the following commands allowed gamosaic to complete:

    # Set following variables
    # if using CL run the following two lines after uncommenting
    # char img, phu
    img = ‘img.fits’
    phu = img//'[0]’

    gemhedit (phu, “INSTRUME”, “GSAOI”, “”)
    gemhedit (phu, “GEM-TLM”, gemdate.outdate, \
    “UT Last modification with GEMINI”, delete-)
    gemhedit (phu, “GAPREPAR”, gemdate.outdate,\
    “UT Time stamp for GAPREPARE”, delete-)
    gemhedit (phu, “NSCIEXT”, 4, \
    “Number of science extensions”, delete-)
    gemhedit (phu, “METACONF”, ‘120.0_8_3+CH4short_G1109_Clear+OBJ_dsfg+FF+TRIM+NLC’, \
    “Data Reduction Metadata”, delete-)
    gemhedit (“img[1]”, “EXTNAME”, “SCI”, \
    “Extension name”, delete-)
    gemhedit (“img[1]”, “EXTVER”, 1, \
    “Extension name”, delete-)
    gemhedit (“img[2]”, “EXTNAME”, “SCI”, \
    “Extension name”, delete-)
    gemhedit (“img[2]”, “EXTVER”, 2, \
    “Extension version”, delete-)
    gemhedit (“img[3]”, “EXTNAME”, “SCI”, \
    “Extension name”, delete-)
    gemhedit (“img[3]”, “EXTVER”, 3, \
    “Extension version”, delete-)
    gemhedit (“img[4]”, “EXTNAME”, “SCI”, \
    “Extension name”, delete-)
    gemhedit (“img[4]”, “EXTVER”, 4, \
    “Extension version”, delete-)



Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.