Welcome to iraf.net Wednesday, May 08 2024 @ 10:53 PM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 Help with Gemini package gemtools.imcoadd
   
kenney
 07/21/2008 04:37PM (Read 7642 times)  
+----
Newbie

Status: offline


Registered: 06/25/2008
Posts: 13
I am getting the following error when I run gemtools.imcoadd in the gemini package:[quote:caef333da5]Transforming S0882rotbaspix +mask to S0883rotbadpixTransforming image tmpmsk494ia to image S0883rotbadpix
ERROR: Cannot open image(tmpmsk494ia)
"nxblock=l_nxblock,nyblock=l_nyblock, Verbose=l_verbose )"
line 1565: gemtools$imcoadd.cl
called as 'imcoadd (images=@HD19994rot.txt, outimage=@HD19994add.txt)'[/quote:caef333da5]A file 'tmpmsk494ia' is never made. I am new to 'image reduction,' so any help would be great. If using imcoadd is hopeless, is there another iraf task I can use? If so, does it take MEF files?

 
Profile Email
 Quote
jturner
 07/21/2008 04:37PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
Hi Kenney,The error seems to be coming from geotran, due to a missing input file that should have been produced at one of the previous steps within imcoadd. I think we'd need to see all the inputs and outputs in order to troubleshoot this. Could you post a complete listing of the parameters from lpar imcoadd, the contents of your text (list) files and exactly what you are typing to call imcoadd, please? Also, do you see any other error messages before the one you included in your quote?Cheers,James.

 
Profile Email
 Quote
kenney
 07/21/2008 04:37PM  
+----
Newbie

Status: offline


Registered: 06/25/2008
Posts: 13
Thank you so much, James, for replying.I am very new at this, so I left everything at the default for my first run; I was only considering changing threshold eventually, as I am also trying to pick up faint objects. The parameter file is as follows:
[quote:96e8ecf569]
gemtools> lpar imcoadd
images = Images to be combined, first image as reference
(outimage = "") Output image name if not derived from reference
(sci_ext = "SCI") Science extension name if MEF input
(var_ext = "VAR") Variance extension name if MEF input
(dq_ext = "DQ") Data quality extension name if MEF input
(immasks = "DQ") Masks of bad pixels for each image
(database = "imcoadd.dat") Database file for transformations
(threshold = 20.) Threshold for daofind, sigma above sky
(fwhm = 7.) FWHMPSF for daofind, in pixels (ref)
(box = 20.) Box size for centering (ref)
(alignmethod = "wcs") Method for rough alignment of images (wcs|user|
(asection = "default") Image sections (2) (alignmethod=twodx)
(xwindow = 181) Window size to search if using twodx
(key_inst = "INSTRUME") Header keyword for instrument
(key_camera = "CAMERA") Header keyword for camera (NIRI only)
(key_inport = "INPORT") Header keyword for ISS port
(key_xoff = "default") Header keyword for instrument X-offset (alignme
(key_yoff = "default") Header keyword for instrument Y-offset (alignme
(instscale = 1.) Scale for offsets arcsec/unit (alignmethod=head
(xsign = "default") XOFFSET sign relative to detector (alignmethod=
(ysign = "default") YOFFSET sign relative to detector (alignmethod=
(key_pixscale = "PIXSCALE") Header keyword for pixel scale in arcsec/pixel
(pixscale = 1.) Pixel scale arcsec/pixel
(dispmag = 1.) Magnify for display
(rotate = no) Assume rotation > 0.5 deg
(scale = no) Allow significant scale differences
(geofitgeom = "rscale") Fitting geometry for geomap
(order = 3) Fitting order for geomap (geofitgeom=general)
(sigfit = 2.5) Sigma rejection for geomap
(niter = 5) Iterations for geomap
(coolimit = 0.3) Sigma in pixels for converged geomap
(geointer = "linear") Interpolation for geotran
(geonxblock = 2048) geotran:X dim of working block size in pixels
(geonyblock = 2048) geotran:Y dim of working block size in pixels
(key_ron = "RDNOISE") Header keyword for read noise in electrons
(key_gain = "GAIN") Header keyqword for gain in electrons/ADU
(ron = 1.) Read out noise [electrons]
(gain = 1.) Gain [electrons/ADU]
(datamin = -1000.) Minimum data value below sky for good pixels
(key_sat = "SATURATI") Header keyword for maximum data value
(datamax = 50000.) Maximum data value for good pixels
(aperture = 30.) Aperture radius for magnitudes for scaling
(limit = 15.) Intensity limit for CR cleaning
(key_limit = yes) Is limit given in sigmas above sky?
(lowsigma = 7.) Sigma rejection limit for CRs
(lowlimit = 500.) Absolute rejection limit for CRs
(scalenoise = 0.) Noise term proportional to signal above sky
(growthrad = 1) Growth radius for CR, 0 or 1
(statsec = "default") Statistics section for sky determination
(badpixfile = "default") Badpixel file or image
(fl_inter = no) Inspect fits interactively
(fl_refmark = no) Mark objects on display for ref image
(fl_mark = no) Mark objects on display for all images
(fl_fixpix = yes) Fixpix input images using DQ (MEF only)
(fl_find = yes) Find objects with daofind
(fl_map = yes) Determine the transformation
(fl_trn = yes) Make transformation and subtract sky
(fl_med = yes) Calculate median image
(fl_add = yes) Calculate mean of masked images
(fl_avg = no) Calculate mean of images, no masking
(fl_scale = yes) Combine mean images scaled with RELINT
(fl_overwrite = no) Overwrite previous results
(logfile = "imcoadd.log") Logfile
(verbose = yes) Verbose extended output
(status = 0) Exit status (0=good)
(inimag = "") List-directed struct, do not change
(inmask = "") List-directed struct, do not change
(input = "") List-directed struct, do not change
(mode = "ql") [/quote:96e8ecf569]I then type:
[quote:96e8ecf569]
>imcoadd @HD19994rot.txt outimage=@HD19994add.txt[/quote:96e8ecf569]where HD19994rot.txt contains the names of the output files from nirotate.If I am missing something, please let me know.[/quote]

 
Profile Email
 Quote
jturner
 07/21/2008 04:37PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
Hi Kenney,I'd probably need to try running this on your input files from nirotate to see what's happening. I was thinking I could grab them from the archive, but of course they are part processed. If you like I can make you a space on the gemini ftp server to upload them to.I'm not very familiar with niri reduction myself, but I wonder whether you are doing something unusual. In the niri example script there are imcoadd calls and nirotate calls but no case where images are run through nirotate before imcoadd. I'm not sure whether it's something that has been tested or not. I can try asking the instrument scientist.I also notice that in the example, imcoadd is called with an explicit filename argument for "badpixfile", which you haven't given. I'm not sure whether that makes a difference, but your error message also refers to bad pixels.Cheers,James.

 
Profile Email
 Quote
kenney
 07/21/2008 04:37PM  
+----
Newbie

Status: offline


Registered: 06/25/2008
Posts: 13
James, Thank you for your help, and I would appreciate space on the ftp server. I have 90 processed files. I would just need to know where I can find it. Also, would you like to see the images prior to nirotate as well?As for what I have done, I pretty much followed the instructions on gemini's site with very few changes to parameters. I ran nirotate because the cass rotator was not fixed for these images; if it is as simple as taking out that step, then I will. The badpixfile default is that for the niri telescope, and I get a message while running imcoadd that it found the file okay.

 
Profile Email
 Quote
jturner
 07/21/2008 04:37PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
I have sent you a "private message" here with the account details, but I'm not sure how you get it.I would just send the files from nirotate for now and just enough to reproduce the problem for a single call to imcoadd. Maybe also the corresponding files from just before the nirotate step.Did you mean to say that you ran nirotate because the cass rotator [b:cd4039126b]was[/b:cd4039126b] fixed (ie. the sky was rotating as the telescope followed it)? I understand that's what it's for. I believe imcoadd can also handle rotation, however, so maybe you don't need the previous step? Why don't you try without nirotate and see whether that gives the result you want? It may require more interaction though.Cheers,James.

 
Profile Email
 Quote
kenney
 07/21/2008 04:37PM  
+----
Newbie

Status: offline


Registered: 06/25/2008
Posts: 13
James, I got your message; thank you.I tried using the files from right before nirotate, but I got a new error, this time for a file tmpcen6274oba and line 1708. I will upload these file, prefixed by r, but I don't know that they will help.Because of this error, the problem is probably further back. However, as a first time user with no teacher, I don't know where to look. Any assistance would be greatly appreciated.

 
Profile Email
 Quote
kenney
 07/21/2008 04:37PM  
+----
Newbie

Status: offline


Registered: 06/25/2008
Posts: 13
JamesI left a private message for you.

 
Profile Email
 Quote
kenney
 07/21/2008 04:37PM  
+----
Newbie

Status: offline


Registered: 06/25/2008
Posts: 13
James, I was able to finally get it working without first doing nirotate. I did have two general questions, however, about the parameters and the results:1. I would like to keep fain objects. Can I do this by changing 'threshold' in imcoadd?2. My final image contains negative values. Is this correct?Thanks for your help!
Kenney

 
Profile Email
 Quote
kenney
 07/21/2008 04:37PM  
+----
Newbie

Status: offline


Registered: 06/25/2008
Posts: 13
I misspoke; I have been attempting to very my results and cannot get imcoadd to run again. Again, the error is looking for a file, tmpcen. I am calling the function as: imcoadd @HD19994r.txt outim=hd19994a.fits

 
Profile Email
 Quote
jturner
 07/21/2008 04:37PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
Hi Kenney,OK. Thanks for the files. I think the NIRI instrument scientist is looking at them (he's also pretty good with IRAF). He says nirotate followed by imcoadd should work, though he hasn't tested it himself. If he doesn't have any suggestions in the next day or two, I'll try running it.Cheers,James.

 
Profile Email
 Quote
jturner
 07/21/2008 04:37PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
PS...
[quote:f81efa5b77]1. I would like to keep fain objects. Can I do this by changing 'threshold' in imcoadd?[/quote:f81efa5b77]
Yes, I think so. Try "help daofind" and "help findpars".[quote:f81efa5b77]2. My final image contains negative values. Is this correct? [/quote:f81efa5b77]
I doubt it, unless the negative values are just random deviations at the level of the noise. Is the average background level between stars significantly negative? If so, I think there is something wrong. It could just be that the sky background level was varying and you subtracted a sky image with more counts than the object image, or something like that. How is the average background in the input images to imcoadd?

 
Profile Email
 Quote
kenney
 07/21/2008 04:37PM  
+----
Newbie

Status: offline


Registered: 06/25/2008
Posts: 13
It does appear to be occurring during imcoadd. Prior to this step, while the minimum is negative for each input image, the other statistics are significantly positive. However, in the coadded image, the average is above zero, but the median and mode are both signficantly negative, indicating the background is negative.

 
Profile Email
 Quote
Andy
 07/21/2008 04:37PM  
+----
Newbie

Status: offline


Registered: 07/24/2008
Posts: 1
Unfortunatly, there aren't any stars to for imcoadd to "find" (at least there aren't any which can be centroided) and therefore I don't think that you can easily use imcoadd. Note that the imcoadd help states "In order for IMCOADD to work best the images need to contain 5 or more point-like sources". You should try gemcombine if you just want to combine the images with bad pixel rejection maintaining the MEF.However, there is a more fundamental problem here: it appears that the center of the WCS is off by a significant amount, and this is causing problems in the derotation. The center of the WCS should be approximately the center of the detector (512,512), however, looking in the header I see that the WCS center is actually defined to be: CRPIX1 = 644.1 and CRPIX2 = 503.8. You therefore need to look at the images and attempt to measure the exact center of rotation and then update the headers accordingly (for illustrative purposes, I will assume that the center is 512,512). Once the headers have been updated nirotate should work properly and one should be able to simply stack the de-rotated images using gemcombine:[code:1:3a8e703d61]
unlearn display
display S0882r[1] 1 zs- zr- z1=0 z2=1000 bpmask=S0882r[DQ] bpdisplay=overlay
display S0930r[1] 2 zs- zr- z1=0 z2=1000 bpmask=S0930r[DQ] bpdisplay=overlay
display S0971r[1] 3 zs- zr- z1=0 z2=1000 bpmask=S0971r[DQ] bpdisplay=overlayhedit S0???r.fits[1] CRPIX1 512 verify-
hedit S0???r.fits[1] CRPIX2 512 verify-unlearn nirotate
nirotate S0???r.fitsdisplay rotS0882r[1] 1 zs- zr- z1=0 z2=1000 bpmask=rotS0882r[DQ] bpdisplay=overlay
display rotS0930r[1] 2 zs- zr- z1=0 z2=1000 bpmask=rotS0930r[DQ] bpdisplay=overlay
display rotS0971r[1] 3 zs- zr- z1=0 z2=1000 bpmask=rotS0971r[DQ] bpdisplay=overlayunlearn gemcombine
gemcombine rotS0???r.fits hd19994 fl_vardq+ fl_dqprop+ nkeep=0 masktype=goodvalue zero=mode
display hd19994[1] 4 zs- zr- z1=100 z2=500 bpmask=hd19994[DQ] bpdisplay=overlay[/code:1:3a8e703d61]

 
Profile Email
 Quote
   
Content generated in: 0.24 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login