Houdebine |
07/13/2008 06:25AM (Read 16112 times)
|
|
|
Status: offline
Registered: 07/12/2008
Posts: 8
|
I have a problem with plotting a 1d spectrum. All the files are in my directory,
but when I try to plot I get:on> splot extra039
ERROR: Cannot open image (extra039)Can someone let me know why iraf cannot find my files ?
|
|
|
|
sukye |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 07/13/2008
Posts: 1
|
i met a similar problem when i use imcopy task.
ERROR (741, "Cannot open file ....but more trick here is that some of other files produced together
could be opened successfully. i have tried chmod u+w with no luck...sujian
|
|
|
|
valdes |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 11/11/2005
Posts: 728
|
Hello,To help you please send the output of the commands:[code:1:0bf124d331]
cl> dir l+
cl> lpar splot
[/code:1:0bf124d331]Yours,
Frank Valdes
|
|
|
|
Houdebine |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 07/12/2008
Posts: 8
|
I get this:I get many files -b-rwr-r- eric 15360 Dec 7 1992 smooth010.pix
-b-rwr-r- eric 8860 Dec 7 1992 smooth013.imh
-b-rwr-r- eric 28160 Dec 7 1992 smooth013.pix
-b-rwr-r- eric 8860 Dec 7 1992 smooth015.imh
-b-rwr-r- eric 19456 Dec 7 1992 smooth015.pix
-b-rwr-r- eric 8860 Dec 4 1992 smooth016.imh
-b-rwr-r- eric 19456 Dec 4 1992 smooth016.pix
-b-rwr-r- eric 8860 Dec 4 1992 smooth032.imh
-b-rwr-r- eric 19456 Dec 4 1992 smooth032.pix
-b-rwr-r- eric 8860 Dec 7 1992 smooth034.imh
-b-rwr-r- eric 28160 Dec 7 1992 smooth034.pix
-b-rwr-r- eric 8860 Dec 18 1992 smooth043.imh
-b-rwr-r- eric 8860 Dec 7 1992 smooth045.imh
-b-rwr-r- eric 19456 Dec 7 1992 smooth045.pix
-b-rwr-r- eric 8860 Dec 4 1992 smooth051.imh
-b-rwr-r- eric 25088 Dec 4 1992 smooth051.pix
-b-rwr-r- eric 8536 Dec 7 1992 smooth053.imh
-b-rwr-r- eric 25088 Dec 7 1992 smooth053.pix
-b-rwr-r- eric 8536 Dec 4 1992 smooth055.imh
-b-rwr-r- eric 25088 Dec 4 1992 smooth055.pix
-b-rwr-r- eric 8860 Dec 4 1992 smooth056.imh
-b-rwr-r- eric 25088 Dec 4 1992 smooth056.pix
-b-rwr-r- eric 8536 Dec 7 1992 smooth057.imh
-b-rwr-r- eric 28160 Dec 7 1992 smooth057.pix
-b-rwr-r- eric 8536 Dec 8 1992 smooth059.imh
-b-rwr-r- eric 15360 Dec 8 1992 smooth059.pix
-b-rwr-r- eric 8536 Dec 8 1992 smooth063.imh
-b-rwr-r- eric 13312 Dec 8 1992 smooth063.pix
-b-rwr-r- eric 8536 Dec 8 1992 smooth064.imh
-b-rwr-r- eric 13312 Dec 8 1992 smooth064.pix
-b-rwr-r- eric 8536 Dec 8 1992 smooth066.imh
-b-rwr-r- eric 13312 Dec 8 1992 smooth066.pix
-t-rwr-r- eric 46097 Jun 28 1996 sopri0.ps
-b-rwr-r- eric 15872 Nov 20 1991 table.tbl
-b-rwr-r- eric 8704 Nov 20 1991 tes.tbl
-b-rwr-r- eric 26112 Jun 28 1996 test.bdf
-b-rwr-r- eric 14848 Apr 13 1992 th1.bdf
-b-rwr-r- eric 14848 Apr 13 1992 th_1.bdf
-b-rwr-r- eric 9216 Nov 20 1991 total_01.tbl
-b-rwr-r- eric 8704 Apr 13 1992 total_11.bdf
-b-rwr-r- eric 9216 Nov 20 1991 total_11.tbl
dt-rwr-r- eric 4096 Aug 2 1995 uparmon> lpar splot
images = List of images to plot
line = 1 Image line/aperture to plot
band = 1 Image band to plot
star_name = Standard star name
mag = Magnitude of star
magband = Magnitude type
teff = Effective temperature or spectral type
next_image = Next image to plot
new_image = Image to create
overwrite = Overwrite image?
spec2 = Spectrum
constant = Constant to be applied
wavelength = Dispersion coordinate:
linelist = "" File
wstart = Starting wavelength
wend = Ending wavelength
dw = Wavelength per pixel
boxsize = Smoothing box size (odd number)
(units = "") Plotting units
(options = "auto wreset") Combination of plotting options:\nauto, zero, x
(xmin = INDEF) Minimum X value of initial graph
(xmax = INDEF) Maximum X value of initial graph
(ymin = INDEF) Minimum Y value of initial graph
(ymax = INDEF) Maximum Y value of initial graph
(save_file = "splot.log") File to contain answers
(graphics = "stdgraph") Output graphics device
(cursor = "") Graphics cursor input\n\n# PARAMETERS FOR ERROR
(nerrsample = 0) Number of error samples (<10 for no errors)
(sigma0 = INDEF) Constant gaussian noise term (INDEF for no erro
(invgain = INDEF) Inverse gain term (INDEF for no errors)\n\n# PA
(function = "spline3") Fitting function
(order = 1) Order of fitting function
(low_reject = 2.) Low rejection in sigma of fit
(high_reject = 4.) High rejection in sigma of fit
(niterate = 10) Number of rejection iterations
(grow = 1.) Rejection growing radius in pixels
(markrej = yes) Mark rejected points?\n\n# PARAMETERS FOR OVERP
(caldir = )_.caldir) Directory containing calibration data
(fnuzero = 3.6800000000000E-20) Absolute flux zero point\n\n# PARAMETERS U
(mode = "ql")
|
|
|
|
valdes |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 11/11/2005
Posts: 728
|
Thank you for the additional information.Maybe you deleted it but your original problem was with spectrum extra039 which is not in your directory listing. Can you splot one of the .imh images I see; e.g.on> splot smooth013.imhFrank
|
|
|
|
Houdebine |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 07/12/2008
Posts: 8
|
I have the same problem with all my files. They are in the directory, but iraf can't
"see" them ....
|
|
|
|
valdes |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 11/11/2005
Posts: 728
|
The dates on the files appear to be very old, around 1992. Could it be that you moved the files from some earlier computer? In that case maybe you changed computers such that the byte orders are wrong. FITS files are computer independent but the native IRAF .imh/.pix files are not. Let me know the history of these files.Frank
|
|
|
|
Houdebine |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 07/12/2008
Posts: 8
|
That must be the cause. I used to work on a sun, and now I have a PC. I did not know that iraf files are computer dependent.
Thanks
|
|
|
|
epud |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 10/18/2007
Posts: 14
|
I have the problem that iraf can at first not open the newly created file called flats.list. When I run in a second time, it opens without problems.The first error shows:[code:1:f88e25f51e]
Killing IRAF task `ccdproc'
Traceback (most recent call last):
File "/home/paul/python/reduce.py", line 179, in <module>
order=3) #
File "/scisoft/lib/python2.5/site-packages/pyraf/iraftask.py", line 674, in __call__
return apply(self.run,args,kw)
File "/scisoft/lib/python2.5/site-packages/pyraf/iraftask.py", line 277, in run
self._run(redirKW, specialKW)
File "/scisoft/lib/python2.5/site-packages/pyraf/iraftask.py", line 719, in _run
"\n" + str(value))
pytools.irafglobals.IrafError: Error running IRAF task ccdproc
IRAF task terminated abnormally
ERROR (741, "Cannot open file (flats.list)")
[/code:1:f88e25f51e]Anybody have any ideas?
|
|
|
|
fitz |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Any chance you're specifying 'flats.list' instead of '@flats.list' ??
|
|
|
|
epud |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 10/18/2007
Posts: 14
|
Hello fitzI am indeed specifying @flats.list
This might help. It is the "else" part which I have problems running:
biassec, and trimsec have been defined above. Also bias is a variable with bias = "bias.fits"[code:1:aae967bad6]
if flatfile==True: print "Flat file(s) found: "+bold+"flat.fits"+reset+"\n"
# Put flat file in object folder
shutil.copyfile("flat.fits", objectdir+"flat.fits")else:
# Read the first .fits file and see which filter was used
filenames = [x for x in listdir('.') if x.endswith('.fits')]
firstfits = filenames[0]
print firstfits
filter1 = getheader(firstfits)['FILTER1']
print "Combining flats taken with filter: "+underline+filter1+reset+"\n"
c = [fn for fn in listdir('.') if fn.endswith('t.fits') and fn.startswith('0') ]
f = open('flats.list', 'w+')
for fn in c:
print >> f, fn + '[1,overwrite+]'
f.close()
# Subtract bias from flat
iraf.noao.imred.ccdred.ccdproc(#### FLAT parameters ####
"@flats.list",
output="b//@flats.list",
ccdtype=" ",
oversca="no",
trim="no",
zerocor="yes",
darkcor="no",
fixpix="no",
flatcor="no",
illumcor="no",
fringec="no",
readcor="no",
scancor="no",
zero=bias,
biassec=biassection,
trimsec=trimsection,
interac="no",
order=3)
#################################[/code:1:aae967bad6]
|
|
|
|
epud |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 10/18/2007
Posts: 14
|
I was not able to solve this problem but instead I made only an output list called @out.list and as an input I put *.fits which skips the whole ordeal of reading the list in the first place.
|
|
|
|
epud |
07/13/2008 06:25AM
|
|
|
Status: offline
Registered: 10/18/2007
Posts: 14
|
also make sure that both pyraf and iraf are in the same directory. This was not the case initially for me.
|
|
|
|