Welcome to iraf.net Monday, May 13 2024 @ 02:48 PM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 Using wmosaic with FITS files
   
lnxbil
 01/03/2008 03:48PM (Read 2730 times)  
+----
Newbie

Status: offline


Registered: 01/03/2008
Posts: 2
Hi everyone,I'm new to this software and get it successfully installed on my Ubuntu machine and everything seems to work fine. I can login and use things like [b:cefaafbf7b]STSDAS[/b:cefaafbf7b]. Furthermore, I'm not a astronomer I am a computer scientist and need to use raw images of hubble for some image processing things (can't mention it yet, still under investigation and development). Besides, I'm not a native speaker, so please apologize my english mistakes Big GrinI want to combine HST WFPC2 images with [i:cefaafbf7b]wmosaic[/i:cefaafbf7b] to one single image and further combine - if possible - several wavelength images to a color image with some corrections like shift, etc. (all in 16 or 32-bit precision). Currently, I downloaded images (Boomerang nebula) for the HST archive[code:1:cefaafbf7b]u47b0301b_asn.fits
u47b0301r_c0f.fits
u47b0301r_c1f.fits
u47b0301r_c3t.fits
u47b0301r_shf.fits
u47b0301r_trl.fits
u47b0301r_x0f.fits
u47b0302r_c0f.fits
u47b0302r_c1f.fits
u47b0302r_c3t.fits
u47b0302r_shf.fits
u47b0302r_trl.fits
u47b0302r_x0f.fits
[/code:1:cefaafbf7b]Using [b:cefaafbf7b]DS9[/b:cefaafbf7b] I can open the *c0f* files. If I try to open it with [i:cefaafbf7b]wmosaic[/i:cefaafbf7b], I get the following error:[code:1:cefaafbf7b]wfpc> wmosaic u47b0301r_c0f.fits test.fits
ERROR: input image u47b0301r_c0f.fits is not 2-D
[/code:1:cefaafbf7b]
(Same error with image [i:cefaafbf7b]u47b0301r_c0f.fits[0][/i:cefaafbf7b])If I check the file with [i:cefaafbf7b]imheader[/i:cefaafbf7b] I get:
[code:1:cefaafbf7b]wfpc> imheader u47b0301r_c0f.fits[0]
u47b0301r_c0f.fits[0][800,800,4][real]:
[/code:1:cefaafbf7b]After some internet search I found lots of examples using [i:cefaafbf7b]hhh[/i:cefaafbf7b] files. Yet, if I convert the images to hhh it doesn't work either:[code:1:cefaafbf7b]wfpc> rfits u47b0301r_c0f.fits 0 out.hhh
File: u47b0301r_c0f.fits -> out.hhh size=800x800x4
bitpix=-32 scaling=none pixtype=real
Warning: RFT_PUT_IMAGE_LINE: Error writing FITS data
Warning: FITS extensions may be present
[/code:1:cefaafbf7b]The file exists, but doesn't work with [i:cefaafbf7b]wmosaic[/i:cefaafbf7b], too:[code:1:cefaafbf7b]wfpc> wmosaic out.hhh other
ERROR: input image out.hhh is not 2-D
[/code:1:cefaafbf7b]
Does anybody have any clue what it could be? Is it also possible to combine several different-wavelength images to a colored one?Best regards
Andreas

 
Profile Email
 Quote
fitz
 01/03/2008 03:48PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I'm not familiar with WMOSAIC specifically, but in general terms you need to use the STRFITS task in TABLES or STSDAS to convert MEF files. The image you have is a 3-D image 800x800x4, so you'll need to use an image section to create a 2-D slice for each plane, e.g.[code:1:794bea2ccc]
cl> imhead u47b0301r_c0f[0][*,*,1][/code:1:794bea2ccc]to access extension zero and the first plane of the image.There's nothing in particular to create color images as in 'pretty pictures', however see the EXPORT task in the DATAIO package (help page examples) as one way to create e.g. a color GIF with RGB components made up of separate images.Cheers,
-Mike

 
Profile Email
 Quote
lnxbil
 01/03/2008 03:48PM  
+----
Newbie

Status: offline


Registered: 01/03/2008
Posts: 2
I found the problem and my first try was in the right direction, but I have to use the right format [i:320caccc5e]c0h[/i:320caccc5e] not [i:320caccc5e]hhh[/i:320caccc5e].
[code:1:320caccc5e]wfpc> strfits u5310101r_c0f.fits "" /tmp/test.c0h
wfpc> imheader /tmp/u5310101r.c0h
/tmp/u5310101r.c0h[1/4][800,800][real]: U5310101R[1/4]
[/code:1:320caccc5e]
After that, everything works as expected.I use the following code, which may be helpful for other people:
[code:1:320caccc5e]# Converting Fits files
strfits u531010er_c0f.fits "" u531010er.c0h
strfits u531010fr_c0f.fits "" u531010fr.c0h
strfits u531010gr_c0f.fits "" u531010gr.c0h# Creating Image List
files u531010er.c0h > list
files u531010fr.c0h >> list
files u531010gr.c0h >> list# Removing cosmic rays
crrej @list combine.c0h "" "4,4,3,2"# Creating Mosaic
wmosaic combine.c0h mosaic.c0h# Converting to FITS file
stwfits mosaic.c0h u531010e_10f_10g.fits
[/code:1:320caccc5e]
Best regards and thank you for your answer.
Andreas

 
Profile Email
 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