Welcome to iraf.net Saturday, May 11 2024 @ 03:08 PM GMT
massey |
08/21/2014 01:25PM (Read 1063 times)
|
|
|
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
|
|
|
|
fitz |
08/21/2014 04:09PM
|
|
|
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.
|
|
|
|
massey |
08/21/2014 04:12PM
|
|
|
Status: offline
Registered: 02/10/2006
Posts: 162
|
Mike---thanks! Yes, that's just what I needed to know!
|
|
|
|
| |
|
Content generated in: 0.10 seconds |
|