Welcome to iraf.net Friday, March 29 2024 @ 07:50 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 cosmic lacos problem
   
sapna
 01/28/2016 07:11PM (Read 1414 times)  
+----
Newbie

Status: offline


Registered: 01/03/2016
Posts: 13
I have a script: cosmic.cl as:
!ls *bf.fits\$this->_split2($m[0]) c.in
!sed "s/bf.fits/bfc.fits/g" c.in\$this->_split2($m[0]) c.out
!sed "s/bf.fits/bf.pl/g" c.in\$this->_split2($m[0]) bad.in
string *list1
string *list2
list1="c.in"
list2="c.out"
list="bad.in"
task lacos_spec=/scisoft/share/iraf/extern/stsdas/lacos_spec.cl
while ( (fscan (list1, s1) != EOF) && (fscan (list2, s2) != EOF) && (fscan (list, s3) != EOF) ) {
print (s1)
unlearn lacos_spec
lacos( input=s1, output=s2, outmask=s3,gain=1.22,readn=4.8,xorder=9,
yorder=3,sigclip=4.5,sigfrac=0.5,objlim=1.,niter=3,verbose=yes)
}
when i am running this script it is working fine for first few file then after few files run i am getting error like:
ERROR: floating point invalid operation
"imcalc(outmask//","//oldoutput,inputmask,"(1-10000*im1)*im2",verb-)"
line 277: /scisoft/share/iraf/extern/stsdas/lacos_spec.cl
Any one know what is wrong???
where c.in :
G191B2B_250_3500_4_Grism_7_2015_11_15_yk150027bf.fits
J0231p0642_250_3500_4_Grism_7_2015_11_15_yk150021bf.fits
J0231p0642_250_3500_4_Grism_7_2015_11_15_yk150022bf.fits
J0231p0642_250_3500_4_Grism_7_2015_11_15_yk150023bf.fits
J0237p2848_250_3500_4_Grism_7_2015_11_15_yk150030bf.fits
J0237p2848_250_3500_4_Grism_7_2015_11_15_yk150031bf.fits
J0237p2848_250_3500_4_Grism_7_2015_11_15_yk150032bf.fits
J0442p0017_250_3500_4_Grism_7_2015_11_15_yk150035bf.fits
J0442p0017_250_3500_4_Grism_7_2015_11_15_yk150036bf.fits
J2240+1326_250_3500_4_Grism_7_2015_11_15_yk150018bf.fits
c.out :
G191B2B_250_3500_4_Grism_7_2015_11_15_yk150027bfc.fits
J0231p0642_250_3500_4_Grism_7_2015_11_15_yk150021bfc.fits
J0231p0642_250_3500_4_Grism_7_2015_11_15_yk150022bfc.fits
J0231p0642_250_3500_4_Grism_7_2015_11_15_yk150023bfc.fits
J0237p2848_250_3500_4_Grism_7_2015_11_15_yk150030bfc.fits
J0237p2848_250_3500_4_Grism_7_2015_11_15_yk150031bfc.fits
J0237p2848_250_3500_4_Grism_7_2015_11_15_yk150032bfc.fits
J0442p0017_250_3500_4_Grism_7_2015_11_15_yk150035bfc.fits
J0442p0017_250_3500_4_Grism_7_2015_11_15_yk150036bfc.fits
J2240+1326_250_3500_4_Grism_7_2015_11_15_yk150018bfc.fits




 
Profile Email
 Quote
fitz
 01/28/2016 07:23PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Try putting a "flpr()" after the call to lacos in the loop, this will clear out and problems with uninitialized code or other crud that might build up in the script. You might also consider using the IMEXPR task instead of IMCALC to avoid problems in the latter.

 
Profile Email
 Quote
sapna
 01/28/2016 07:55PM  
+----
Newbie

Status: offline


Registered: 01/03/2016
Posts: 13
Hey fitz thanks for your kind reply but i tried both but it is not helping however? What else could be the reason?

 
Profile Email
 Quote
fitz
 01/28/2016 10:32PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
If it fails reliably on the same image every time then the problem may be data related (e.g. an unexpected zero value or NaN, a value of 10^-45, etc) and it may be that you could process the remainder of the list. IMCALC is an STSDAS task so you might also ask their help desk (help@stsci.edu) but be aware they're not doing much support work for this any longer. If you're using an old version of SciSoft you might try installing the latest IRAF and STSDAS to see if that helps, otherwise the error simply indicates an uncaught floating point error of some kind.

Does a simple IMSTAT on the data show any unusual values?

 
Profile Email
 Quote
sapna
 01/29/2016 04:45AM  
+----
Newbie

Status: offline


Registered: 01/03/2016
Posts: 13
ecl\$this->_split2($m[0]) imstat @c.in
# IMAGE NPIX MEAN STDDEV MIN MAX
G191B2B_250_3500_4_Grism_7_2015_11_15_yk150027bf.fits 875000 656.9 4059. -587.3 136268.
J0231p0642_250_3500_4_Grism_7_2015_11_15_yk150021bf.fits 875000 118.7 539.1 -632.8 131105.
J0231p0642_250_3500_4_Grism_7_2015_11_15_yk150022bf.fits 875000 99.71 444.7 -621.7 89742.
J0231p0642_250_3500_4_Grism_7_2015_11_15_yk150023bf.fits 875000 108.4 509.8 -581.7 162582.
J0237p2848_250_3500_4_Grism_7_2015_11_15_yk150030bf.fits 875000 103.7 522.2 -712. 115619.
J0237p2848_250_3500_4_Grism_7_2015_11_15_yk150031bf.fits 875000 127.8 596.2 -525.7 167485.
J0237p2848_250_3500_4_Grism_7_2015_11_15_yk150032bf.fits 875000 126.1 1524. -564. 982072.
J0442p0017_250_3500_4_Grism_7_2015_11_15_yk150035bf.fits 875000 127.3 1438. -682.7 593174.
J0442p0017_250_3500_4_Grism_7_2015_11_15_yk150036bf.fits 875000 137.1 605.4 -658.6 177567.
J2240+1326_250_3500_4_Grism_7_2015_11_15_yk150018bf.fits 875000 126.7 2311. -185.6 750257.

I am not sure for any unusual value here. Is it???

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