Welcome to iraf.net Thursday, March 28 2024 @ 11:27 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 stitching four images into one
   
massey
 08/21/2014 01:25PM (Read 1052 times)  
+++++
Active Member

Status: offline


Registered: 02/10/2006
Posts: 162
I'm using a CCD camera that reads out through 4 amplifiers and (sadly) generates four separate images: c1, c2, c3, and c4, each 2048x2056. I'm writing a simple pipeline for putting the pieces back together into a single 4096x4112 image after removing the overscan, trimming, flipping the orientations, and so on. I have two questions:

1) I'm currently generating the blank image by using "imexpr"; this seems to work fine. I've only recently come across "mkimage." Are there any advantages to the latter? Speed isn't a big issue here.

2) My current difficulty is that I would like to move over all of the image headers from c2 (say) to the new image. The only way I can see to do this is to laboriously go through and do an imget on every single header word I care about and then write those to the new image. Is there some means by which I can copy over the whole image header to the new image?

thanks!
---phil

 
Profile Email Website
 Quote
fitz
 08/21/2014 04:09PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Hi Phil,

The MKIMAGE task was originally intended for developing/debugging tasks and its functionality has largely been replaced by the ARTDATA package (in particular, MKPATTERN). Speed-wise I don't think there are any inherent advantages/disadvantages to any of these tasks in creating a blank image, but I can answer your second question by pointing out that MKPATTERN has a 'header' parameter that will populate the header of the new image. So, if you dump the header of the c2 image to a file you can immediately put it into the blank image.

Alternatively, look at the HFIX task for more complex editing using a user-defined command string, in this case something like

cl\$this->_split2($m[0]) hfix c2.fits command="copy $fname /tmp/c2.hdr"
cl\$this->_split2($m[0]) hfix blank.fits command="copy /tmp/c2.hdr $fname"

The first command copies out the user keywords to the file /tmp/c2.hdr from the c2 image, the next one replaces the header en masse in the blank image. Hope this helps.

 
Profile Email
 Quote
massey
 08/21/2014 04:12PM  
+++++
Active Member

Status: offline


Registered: 02/10/2006
Posts: 162
Mike---thanks! Yes, that's just what I needed to know!

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