Welcome to iraf.net Wednesday, May 22 2024 @ 01:26 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 echelle.apnorm: PANIC in x_apextract.e Write to IPC with no
   
leon
 06/17/2009 08:12AM (Read 4276 times)  
+----
Newbie

Status: offline


Registered: 12/28/2008
Posts: 3
I'm trying to normalize the flat under PyRAF, but I got the following error message:
[code:1:75b63215ee]
--> noao
--> imred
--> echelle
... ...
--> apnormalize
List of images to normalize: flat_b
List of output normalized images: flat_n
Recenter apertures for flat_b? ('yes'):
Resize apertures for flat_b? ('yes'):
Edit apertures for flat_b? ('yes'):
Trace apertures for flat_b?Fit traced positions for flat_b interactively?Not enough points traced for aperture 1 of flat_b
Write apertures for flat_b to databaseNormalize apertures in flat_b?Fit spectra from flat_b interactively?Killing IRAF task `apnormalize'PANIC in `/iraf/iraf/noao/bin.linux/x_apextract.e': Write to IPC with no reader
Traceback (innermost last):
File "<CL script CL1>", line 1, in <module>
iraf.apnormalize(_save=1)
IrafError: Could not find task apnorm to get parameter apnorm.background
Failed to get parameter apnorm1.background
[/code:1:75b63215ee]Then I try to write a Python script:
[code:1:75b63215ee]
from pyraf import iraf
iraf.noao(_doprint=0)
iraf.imred(_doprint=0)
iraf.echelle(_doprint=0)
... ...
iraf.apnormalize.unlearn()
iraf.apnormalize.input = "flat_b.fits"
iraf.apnormalize.output = "flat_n.fits"
iraf.apnormalize.find = "no"
iraf.apnormalize.trace = "no"
iraf.apnormalize.fittrac = "no"
iraf.apnormalize.functio = "legendre"
iraf.apnormalize.order = 7
iraf.apnormalize.niterat = 5
iraf.apnormalize()
[/code:1:75b63215ee]And it still doesn't work.
[code:1:75b63215ee]
... ...
List of images to normalize ('flat_b.fits'):
List of output normalized images ('flat_n.fits'):
Recenter apertures for flat_b? ('yes'):
Resize apertures for flat_b? ('yes'):
Edit apertures for flat_b? ('yes'):
Write apertures for flat_b to databaseNormalize apertures in flat_b?Fit spectra from flat_b interactively?Killing IRAF task `apnormalize'
Traceback (most recent call last):
File "./a.py", line 154, in <module>
iraf.apnormalize()
File "/usr/lib/python2.5/site-packages/pyraf/iraftask.py", line 673, in __call__
return apply(self.run,args,kw)
File "/usr/lib/python2.5/site-packages/pyraf/iraftask.py", line 277, in run
self._run(redirKW, specialKW)
File "/usr/lib/python2.5/site-packages/pyraf/iraftask.py", line 715, in _run
(self, iraf.getVarDict()), redirKW)
File "/usr/lib/python2.5/site-packages/pyraf/irafexecute.py", line 349, in IrafExecute
raise exc
pyraf.irafglobals.IrafError: Could not find task apnorm to get parameter apnorm.background
Failed to get parameter apnorm1.background
[/code:1:75b63215ee]It seems that PyRAF cannot distinguish the task "apnormalize" and "apnorm1". Is it a bug? How can i fix it?

 
Profile Email
 Quote
fitz
 06/17/2009 08:12AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I'd suggest getting the latest version of PyRAF if you haven't already (a new version was released recently). If this is a bug, it is in the PyRAF code and not IRAF, you should contact help@stsci.edu to follow up.-Mike

 
Profile Email
 Quote
leon
 06/17/2009 08:12AM  
+----
Newbie

Status: offline


Registered: 12/28/2008
Posts: 3
[quote:2f77f08f3b="fitz"]I'd suggest getting the latest version of PyRAF if you haven't already (a new version was released recently). If this is a bug, it is in the PyRAF code and not IRAF, you should contact help@stsci.edu to follow up.-Mike[/quote:2f77f08f3b]Thank you for your reply, Mike. I have tried PyRAF 1.8 but encountered the same problem Frown .

 
Profile Email
 Quote
leon
 06/17/2009 08:12AM  
+----
Newbie

Status: offline


Registered: 12/28/2008
Posts: 3
Problem solved!by iraf.apnorm1.lParam(), I found that
[code:1:bf5dd935e3]
... ...
# EXTRACTION PARAMETERS

(background = ")apnorm.background") >apnorm.background
(skybox = )apnorm.skybox) >apnorm.skybox
(weights = ")apnorm.weights") >apnorm.weights
(pfit = ")apnorm.pfit") >apnorm.pfit
(clean = )apnorm.clean) >apnorm.clean
(nclean = 0.5) Maximum number of pixels to clean
(niterate = 5) Number of profile fitting iterations
(saturation = )apnorm.saturation) >apnorm.saturation
(readnoise = ")apnorm.readnoise") >apnorm.readnoise
(gain = ")apnorm.gain") >apnorm.gain
(lsigma = )apnorm.lsigma) >apnorm.lsigma
(usigma = )apnorm.usigma) >apnorm.usigma
(polysep = 0.9) Marsh algorithm polynomial spacing
(polyorder = 10) Marsh algorithm polynomial order
(nsubaps = 1) Number of subapertures per aperture
... ...
[/code:1:bf5dd935e3]The problem is, "apnormalize" and "apnorm1" share the same abbreviation “apnorm”, so PyRAF don't know which one do you want to use. In IRAF CL, one can use "apnormalize" by just typing "apnorm". While it doesn't work in PyRAF. You must type either "apnormalize" or "apnorm1".So "apnorm1" task cannot get value of parameters by ")apnorm.XXX".
All you need to do is adding some lines in your script to correct those ")apnorm.XXX" 8)
[code:1:bf5dd935e3]
... ...
iraf.apnorm1.unlearn()
iraf.apnorm1.background = ")apnormalize.background"
iraf.apnorm1.skybox = ")apnormalize.skybox"
iraf.apnorm1.weights = ")apnormalize.weights"
iraf.apnorm1.pfit = ")apnormalize.pfit"
iraf.apnorm1.clean = ")apnormalize.clean"
iraf.apnorm1.saturation = ")apnormalize.saturation"
iraf.apnorm1.readnoise = ")apnormalize.readnoise"
iraf.apnorm1.gain = ")apnormalize.gain"
iraf.apnorm1.lsigma = ")apnormalize.lsigma"
iraf.apnorm1.usigma = ")apnormalize.usigma"
... ...
[/code:1:bf5dd935e3]iraf.apnorm1.lParam()[code:1:bf5dd935e3]
... ...
# EXTRACTION PARAMETERS

(background = ")apnormalize.background") >apnorm.background
(skybox = )apnormalize.skybox) >apnorm.skybox
(weights = ")apnormalize.weights") >apnorm.weights
(pfit = ")apnormalize.pfit") >apnorm.pfit
(clean = )apnormalize.clean) >apnorm.clean
(nclean = 0.5) Maximum number of pixels to clean
(niterate = 5) Number of profile fitting iterations
(saturation = )apnormalize.saturation) >apnorm.saturation
(readnoise = ")apnormalize.readnoise") >apnorm.readnoise
(gain = ")apnormalize.gain") >apnorm.gain
(lsigma = )apnormalize.lsigma) >apnorm.lsigma
(usigma = )apnormalize.usigma) >apnorm.usigma
(polysep = 0.9) Marsh algorithm polynomial spacing
(polyorder = 10) Marsh algorithm polynomial order
(nsubaps = 1) Number of subapertures per aperture
... ...
[/code:1:bf5dd935e3]

 
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