Welcome to iraf.net Tuesday, May 21 2024 @ 10:58 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Why me Lord?
   
dbrenner
 09/25/2009 12:02PM (Read 2091 times)  
++++-
Regular Member

Status: offline


Registered: 05/05/2006
Posts: 115
In two scripts- one not used in days, one after many successful executions- fscan no longer reads whole lines from a file. It first seems to read the file's directory and then seems to treat _ as an end of line.

 
Profile Email
 Quote
fitz
 09/25/2009 12:02PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
If you seriously want a reply to this, please post something useful like the script, input file or comments on what you've changed since it last worked. IRAF can do lots of things, but theories that it can spontaneously gain conciousness to rewrite its own code and torture a specific user should be addressed by trained mental health professionals 8-)

 
Profile Email
 Quote
dbrenner
 09/25/2009 12:02PM  
++++-
Regular Member

Status: offline


Registered: 05/05/2006
Posts: 115
I do believe that iraf is alive. I sent you the code but it managed to prevent from arriving. Here it is again
procedure SR2 (object , date, deltaslice)string object, date
struct *flist
int deltaslicebegin struct line
string home, obj, day, filelist, image, cleaned, cleaning, imgshorter , targetimage, imglonger , output, targeting, dim, annulus, formulaint tmp
int k, cube, dslice, m, ring
real factor[8,44], start, stop, i, min
real r, c, rmin, cmin, imin, startr, stopr, rfactor[8,44], cfactor[8,44], startc, stopc
real stddev, mn, med
obj = object
day = date
home = "/data/processed/"//obj//"/"//day//"/"//"series/"
annulus = "/data/masks/ring.fits"
dslice = deltaslicedim = str(250)//","//str(250)
cd (home)
if ( !access("filelist.lis") )
!ls *.fits > "filelist.lis"
cleaning = home//"cleaning"
cleaned = home//"cleaned"
if (!access(cleaning))
mkdir (cleaning)
if (!access(cleaned))
mkdir (cleaned)
filelist = home//"filelist.lis"
flist = filelistcd (cleaning)
output = cleaned//"/result.fits"
cube = 0
m = 0
imcopy (input = "/data/masks/zero.fits", output = output//"[0,overwrite]")
#print (line)
while (fscan (flist, line) != EOF)
{
cube += 1
delete "*.fits"
*****FAILS HERE ******
line = home//line
print ("file: ", line)
DIDN"T READ THE LINE.
file: /data/processed/ALCOR/2009-03-16/series//data/processed/ALCOR/2009-03-16/series/
Warning: Cannot open image (/data/processed/ALCOR/2009-03-16/seriesdata/processed/ALCOR/2009-03-16/series/)

fscan is no longer reads the list.
If I terminate the script here with
} endI get this /data/masks/zero.fits -> /data/processed/ALCOR/2009-03-16/series/cleaned/result.fits[0,overwrite]
file: /data/processed/ALCOR/2009-03-16/series//data/processed/ALCOR/2009-03-16/series/
file: /data/processed/ALCOR/2009-03-16/series/ALCOR
file: /data/processed/ALCOR/2009-03-16/series/2009-03-16
file: /data/processed/ALCOR/2009-03-16/series//data/processed/ALCOR/2009-03-16/series/filelist.lisHere is a portion of filelist.lisALCOR_O_2009-03-16_300_f004.fits
ALCOR_O_2009-03-16_300_f005.fits
ALCOR_O_2009-03-16_300_f006.fits
ALCOR_O_2009-03-16_300_f007.fits
ALCOR_O_2009-03-16_300_f008.fits

 
Profile Email
 Quote
dbrenner
 09/25/2009 12:02PM  
++++-
Regular Member

Status: offline


Registered: 05/05/2006
Posts: 115
thanks.

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