Welcome to iraf.net Friday, April 26 2024 @ 04:40 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Imarith error - is not an image or number
   
fergusjm
 06/09/2015 02:56PM (Read 3928 times)  
+----
Newbie

Status: offline


Registered: 06/09/2015
Posts: 6
Hello, while trying to flatten my data I keep running into a problem.
The command I'm running is as follows:

imarith trim_18 / flat_hk_mar28_2015 trim_data_flat_18

However I keep receiving an error:

trim_18 is not an image or a number, I know it is though because I can see it in ds9

I tried it again as

imarith trim_18.fits / flat_hk_mar28_2015.fits trim_data_flat_18.fits

but I get the same error, I changed my imtype in the login.cl file to "fits" but that didn't change anything.

Let me know,

Jason

 
Profile Email
 Quote
fitz
 06/09/2015 03:20PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Do any other tasks work on this file, e.g. IMHEAD, IMSTAT, etc? If not then there may be something invalid in the FITS file, you can check this online with small files by using

http://fits.gsfc.nasa.gov/fits_verify.html

If it's bigger than the 40MB limit of that site please upload to the anonftp at ftp://iraf.noao.edu/pub. It would also help to know which IRAF version and platform (Mac or Linux) you are using.

A rare problem you may be seeing if you're using a 32-bit IRAF system is that you can't open the file if it is on a 64-bit filesystem.


 
Profile Email
 Quote
fergusjm
 06/09/2015 03:45PM  
+----
Newbie

Status: offline


Registered: 06/09/2015
Posts: 6
Thanks for the reply,

Neither of those commands work on the file imhead produces the following error:

trim_18.fits: FXF: must specify which FITS extenstion (trim_18).

I have a Mac computer but I am running IRAF on xgterm. The file is too large for that website, how do I upload to the anonftp? When I follow that link and sign in I just see a window with a bunch of files and no where to upload anything. When I try to drag and drop from another finder window I just get an error cursor.

Sorry for the all the questions, I'm still an undergrad Smile


 
Profile Email
 Quote
fitz
 06/09/2015 04:31PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The FITS file is probably fine then, your problem is that you have a Multi-Extension FITS (MEF) file and need to specify the extension explicity, e.g.

cl\$this->_split2($m[0]) imhead trim_18.fits[1] l+

will list the header of the first extension.

For a task like IMARITH you would specify the extension of each image, however you should instead be using the MSCRED package to handle the extensions automatically, e.g.

cl\$this->_split2($m[0]) mscarith trim_18.fits / flat_hk_mar28_2015.fits trim_data_flat_18.fits

will automatically expand the extensions and process each. MSCRED is an external package that must be installed separately.

 
Profile Email
 Quote
fergusjm
 06/09/2015 06:14PM  
+----
Newbie

Status: offline


Registered: 06/09/2015
Posts: 6
I installed the mscred package and tried the command again; this time I get the error:

ERROR: Error in number of extensions

Is it possible that the trim_18.fits has multiple extensions but the flat_hk_mar28_2015.fits only has one extension?

Thanks again

 
Profile Email
 Quote
fitz
 06/09/2015 06:34PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
It's your data, you tell me what's possible. Installing MSCRED should also have installed the FITSUTIL package, you can use the FXHEADER command to print out the structure of each file, e.g.

cl\$this->_split2($m[0]) fitsutil
cl\$this->_split2($m[0]) fxheader trim_18.fits

Depending on your IRAF version you might also be seeing a bug in the new image template code, to work around this do

cl\$this->_split2($m[0]) reset use_new_imt = no

before running the mscarith task. If it works you can make the change permanent in your login.cl file.

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