Welcome to iraf.net Sunday, May 19 2024 @ 07:51 PM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 Mscimage, reflect, constant and reference
   
tdboer
 09/02/2009 03:41PM (Read 2688 times)  
+----
Newbie

Status: offline


Registered: 06/18/2009
Posts: 6
Hi everyone,Maybe someone here can shed some light on some issues I have been thinking about recently. I am reducing some CTIO MOSAIC data, which includes resampling to a common grid. There are basically 3 issues I would like you all to think about.1) The sinc function which I am using tends to cause 'ringing' at the edges, since it suddenly encounters 'strange' values. Now, there are some ways of preventing this, one of which is choosing to have a constant value at your borders. Another way (which is recommended) is to have it reflect of the boundary.
After trying the reflect option I do not see any improvement with regards to the constant boundary option. In an attempt to get some more contrast on what each option does I put the constant boundary value to -20000. This causes very clear 'extreme' effects at the borders for the constant boundary option. However, it also causes these effects when using reflect, while it should ignore the -20000 value.
So, I am not 100% sure if the reflect option even reflects or whether it just also uses the constant boundary value. Has anyone experienced similar issues? 2) There is an option in mscimage to trim of part of the edges of the image you want to resample. The trimmed-off edges will still be used for interpolation, so trimming of part of the edges should solve any 'ringing' . However, it seems to me the only thing the trimming does is trim of a certain number of pixels of the reprojected/resampled output image instead of taking a certain number of pixels of the input chips and taking them along during reprojection. In my case there is quite a bit of curvature to the output image (i.e. after reprojection the chips are no longer straight but curved) and so trimming of something like 20 pixels only cuts of outer parts of the ringing.3) What exactly should one use as a reference image? I am trying to stacking different exposures together(not dithered) using combine after the mscimage step. I resample images one by one. Currently I am using one of the chips of each input mscimage file as the reference(always the same chip, but always a different image). Should I instead use the same chip of ONE image (say the first one in the stack) when resampling all other images in the stack? Or should I use a full resampled image as reference (contrary to just one chip)?
phew, sorry for the long rant, but I just had to write this down as clear as I could...which is unfortunately not very clear.Any thought would be greatly appreciated.
-Thomas de Boer

 
Profile Email
 Quote
valdes
 09/02/2009 03:41PM  
+++++
Active Member

Status: offline


Registered: 11/11/2005
Posts: 728
Hello Thomas,The only way to avoid edge effects is essentially to think you are resampling a smaller image with the data outside still be real data from the full image. Any other boundary handling is just a guess for the behavior of the unknown data. So you are correct that the trim option is the primary way to do this. The trim is mostly set by the half-size of the interpolation kernel; which you say is sinc.You are right that the trim has to be slight bigger to account for the small rotations of the chips in the mosaic. Yes, the edges of the final image will appear curved but the trim is really something applied in pixel space to insure real data falls within the interpolator kernel.The other thing with ringing is that you have to be sure replace bad data with estimated data, usually by interpolation. This means cosmic rays must be found and replaced. This would apply to bad columns and lines at the edges. Also be sure you have a mask that defines the bad data you replaced.There are many ways to define the output sampling. You can do as you said with a single CCD or leave the parameter blank and an average over the CCDs is used. But maybe you should explicitly set the WCS with the "parameters". For the NOAO Mosaics it is generally ok to use N up and E left with a pixel scale of 0.25 pixels/arcsecond.I hope this helps,
Frank Valdes

 
Profile Email
 Quote
tdboer
 09/02/2009 03:41PM  
+----
Newbie

Status: offline


Registered: 06/18/2009
Posts: 6
Hi Frank,I have done some more experimenting with the mscimage task. I have got it to do what I want it to do, so progress is made.
However, when looking over the task I noticed that the input blank value is totally ignored. Also, the boundary condition itself (constant,reflect, etc...) also had no apparent function. So, I took a look at the task itself (IRAF V2.14.1). It seems the blank value is hardcoded to be 0. and the boundary behaviour is hardcoded to be constant.Is there some specific reason for this, or might this be a small bug?Sincerely,
Thomas de Boer

 
Profile Email
 Quote
valdes
 09/02/2009 03:41PM  
+++++
Active Member

Status: offline


Registered: 11/11/2005
Posts: 728
Hi Thomas,Congratulation, you have earned entrance into the Order of Code Checker. You are right that the script defines parameters that it ignores. Note only that for what is done for propagating a mask should not be controlled by the user parameters. Locally you can copy the script and the .par file to a local directory, edit it, and redefine when the task is in the currently loaded package withcl> redefine mscimage=<mypath>/mscimage.clWe will update this task for a future release.Yours,
Frank

 
Profile Email
 Quote
tdboer
 09/02/2009 03:41PM  
+----
Newbie

Status: offline


Registered: 06/18/2009
Posts: 6
Hi Frank,Always glad to help! Thanks for the quick replies and good tips!Sincerely,
Thomas de Boer

 
Profile Email
 Quote
   
Content generated in: 0.15 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