Welcome to iraf.net Saturday, May 11 2024 @ 07:20 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 "logfile" growing out of proportion
   
Gaba_p
 02/26/2009 08:24PM (Read 4637 times)  
++++-
Regular Member

Status: offline


Registered: 10/10/2008
Posts: 104
Hi,I'm trying to get a script to work, but when it gets to the part where "ccdproc" trims the biassec and performs the "zerocor", the logfile starts growing like crazy (it goes up to 4Gbs until IRAF stops and says it can't open logfile) while some temp files are created and deleted (I see this in the working folder) Otherwise the ccdproc task works fine.
This is the part of the script where this happens (h and i are both != 0, so the "ccdproc" inside the else applies. "biassec2" and "trimsec2" are string variables defined previously, which contain the appropriated values.)if (h == 2 && i == 2) {
ccdproc ("*.fit",
output=" ", ccdtype=" ", max_cache=0, noproc=no, fixpix=no, overscan=no,
trim=no, zerocor=yes, darkcor=no, flatcor=no, illumcor=no, fringecor=no,
readcor=no, scancor=no, readaxis="column", fixfile=" ",
biassec="", trimsec="", zero="Zero", dark="",
flat=" ", illum=" ", fringe="", minreplace=1., scantype="shortscan", nscan=1,
interactive=no, function="chebyshev", order=4, sample="*", naverage=1,
niterate=1, low_reject=3., high_reject=3., grow=1.)
}
else {
ccdproc ("*.fit",
output=" ", ccdtype=" ", max_cache=0, noproc=no, fixpix=no, overscan=no,
trim=yes, zerocor=yes, darkcor=no, flatcor=no, illumcor=no, fringecor=no,
readcor=no, scancor=no, readaxis="column", fixfile=" ",
biassec=(biassec2), trimsec=(trimsec2), zero="Zero", dark="",
flat=" ", illum=" ", fringe="", minreplace=1., scantype="shortscan", nscan=1,
interactive=no, function="chebyshev", order=4, sample="*", naverage=1,
niterate=1, low_reject=3., high_reject=3., grow=1.)
}I can't post the entire script because it's pretty big. Is there a way to shut off the logfile, i.e. have IRAF not creating it at all? Is this not advisable?
Thanks for any help!

 
Profile Email Website
 Quote
fitz
 02/26/2009 08:24PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Frank may comment on/question why the logfile is getting so large, but as a quick answer: You can disable the logging by turning off the IMRED package 'verbose' parameter or by setting the package 'logfile' param to a null string (i.e. "").Before you do that, you might want to look at the existing logfile to see whether the amount of output is reasonable for each image, or whether it appears some sort of loop is causing the file to be filled with iterative garbage.
-Mike

 
Profile Email
 Quote
Gaba_p
 02/26/2009 08:24PM  
++++-
Regular Member

Status: offline


Registered: 10/10/2008
Posts: 104
Hi Mike,I checked the logfile and here's the problem: every time IRAF writes the [b:39e1f31a82]name[/b:39e1f31a82] of a file to an output file, this is what it writes:@@@@@@@@file_name.fitand the next file name will have twice as many "@" characters before the actual name. This is also done before in the script when I use the sentence:print (line, >> 'imagenes')where "line" is defined as "struct line" at the beginning of the script.
However it doesn't do this if I write:files *.fit > fit_fileNo idea why it's doing this.I would like for it to work so I'm not forced to turn it off.

 
Profile Email Website
 Quote
Gaba_p
 02/26/2009 08:24PM  
++++-
Regular Member

Status: offline


Registered: 10/10/2008
Posts: 104
Any ideas as to why it might be doing that?
I need to fix it so the script will be done.Thanks.

 
Profile Email Website
 Quote
fitz
 02/26/2009 08:24PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
It's hard to comment without seeing more of the script. The '@' could be garbage characters, or because of the way you wrote the script a parameter that's "@file_name" might be prepending '@' characters and/or no dereferencing 'file_name' to be the value of the variable. Also, is this a procedure script, or are you running it as e.g. "cl < myscript.cl" ?? Is your logfile the same 'imagenes' file you're trying to append? Please either post the script or email it to me and I can comment more on possible problems. Lastly, does turning of the logging in the package parameters still leave output in the file??-Mike

 
Profile Email
 Quote
Gaba_p
 02/26/2009 08:24PM  
++++-
Regular Member

Status: offline


Registered: 10/10/2008
Posts: 104
Well, there's no 'logfile' param in 'ccdproc' so I tried appending a ' logfile ="" ' to the 'ccdproc' task but I got:ERROR: parameter 'logfile' not found.This is how I did it (the ' logfile = "" ' line is at the end):ccdproc ("*.fit",
output=" ", ccdtype=" ", max_cache=0, noproc=no, fixpix=no, overscan=no,
trim=no, zerocor=yes, darkcor=no, flatcor=no, illumcor=no, fringecor=no,
readcor=no, scancor=no, readaxis="column", fixfile=" ",
biassec="", trimsec="", zero="Zero", dark="",
flat=" ", illum=" ", fringe="", minreplace=1., scantype="shortscan", nscan=1,
interactive=no, function="chebyshev", order=4, sample="*", naverage=1,
niterate=1, low_reject=3., high_reject=3., grow=1., logfile = "")
I run the script by calling it from the IRAF 'ecl>' promt; it is defined in my 'loginuser.cl' file as:task $casleored = home/.../casleored.clThis is an excerpt of the script that shows the same behaviour, without being as big as the one I actually use. If you run it, check the logfile when it ends and you'll see the strange characters before the files names. I guess you won't find these characters, so the problem is in my IRAF settings. The thing is I don't know which settings!
#Move BIAS files
mkdir bias
mv bias*.fit bias/#Zerocombine
zerocombine ("bias/bias*.fit",
output="Zero", combine="average", reject="minmax", ccdtype="zero", process=no,
delete=no, clobber=no, scale="none", statsec="", nlow=0, nhigh=1, nkeep=1,
mclip=yes, lsigma=3., hsigma=3., rdnoise="RDNOISE", gain="GAIN", snoise="0.",
pclip=-0.5, blank=0.)#Zerocor
ccdproc ("*.fit",
output=" ", ccdtype=" ", max_cache=0, noproc=no, fixpix=no, overscan=no,
trim=no, zerocor=yes, darkcor=no, flatcor=no, illumcor=no, fringecor=no,
readcor=no, scancor=no, readaxis="column", fixfile=" ",
biassec="", trimsec="", zero="Zero", dark="",
flat=" ", illum=" ", fringe="", minreplace=1., scantype="shortscan", nscan=1,
interactive=no, function="chebyshev", order=4, sample="*", naverage=1,
niterate=1, low_reject=3., high_reject=3., grow=1.)

 
Profile Email Website
 Quote
fitz
 02/26/2009 08:24PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The 'logfile' parameter is a package param for IMRED (i.e. do an "cl> epar imred"), but you can set it on the ccdproc() command line anyway.I'm assuming your script does not have a 'procedure' statement at the beginning? In this case you can still declare it as a parameterless script but it effectively runs as if you had redirected to the cl. Try renaming the file 'casleored.cl' and making it into a procedure script, i.e.[code:1:50c1e6c6ba]
procedure casleored ()begin .....include the script statements you already haveend
[/code:1:50c1e6c6ba]This should be enough to turn your file into a procedure script. Otherwise, if you just run ccdproc from the command line does the logfile grow just as large?-Mike

 
Profile Email
 Quote
Gaba_p
 02/26/2009 08:24PM  
++++-
Regular Member

Status: offline


Registered: 10/10/2008
Posts: 104
I couldn't set the 'logfile' parameter within ccdproc, how do you do it?My script does not have a 'procedure' statement at the beginning. I tried making it into a procedure script changing the line in my 'loginuser.cl' from:task $casleored = home/.../casleored.cl totask casleored = home/.../casleored.cl and writing the script in the way you proposed:procedure casleored ()beginscript statementend but when I try to run it I get:'ERROR: cannot read parameter file: 'home.../casleored.cl'Now, if I add a dummy argument like so:procedure casleored (dummy)string dummy {promt="dummy argument"}begin
...now what I get is a 'Syntax error, line 11', which is: 'mv bias*.fit bias/' ; with the little upwards arrow pointing to the 'i' in 'fit' (???) No idea what this is about.
If I remove that line the scripts run fine, but the names of the files in the logfile are still written with the '@' characters before the actual name.If I run 'ccdproc' from the command line it does the same thing with the logfile, so it's not a script problem, but a 'ccdproc' problem. Which is really weird because it didn't do this before I went on my summer vacations! It's like it changed it's behaviour by itself Smile
Is there a way to reset ALL IRAF parameters to default, so it's like it was just installed?

 
Profile Email Website
 Quote
fitz
 02/26/2009 08:24PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:7a24af7e9f]
Is there a way to reset ALL IRAF parameters to default, so it's like it was just installed?[/quote:7a24af7e9f]Do a new MKIRAF, and answer 'yes' when asked if you want to reinitialize your uparm directory.[/quote]

 
Profile Email
 Quote
Gaba_p
 02/26/2009 08:24PM  
++++-
Regular Member

Status: offline


Registered: 10/10/2008
Posts: 104
I did MKIRAF and still the same. I'm starting to lose it. Evil

 
Profile Email Website
 Quote
fitz
 02/26/2009 08:24PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
In procedure scripts you need to use "compute mode" syntax. That is, your commands[code:1:73bdbcfce6]
#Move BIAS files
mkdir bias
mv bias*.fit bias/ [/code:1:73bdbcfce6]Needs to be written using the parenthesis and with arguments separated by commas, and with literal values in strings, e.g.[code:1:73bdbcfce6]
mkdir ("bias")
mv ("bias*.fit", "bias/")[/code:1:73bdbcfce6]You only have parameters if something is declared in the 'procedure' statement and before the 'begin' line, since you don't have that use the original task statement "task $casleored = .....".I don't know where the @file stuff is coming from, none of the code you've posted uses it!-Mike

 
Profile Email
 Quote
Gaba_p
 02/26/2009 08:24PM  
++++-
Regular Member

Status: offline


Registered: 10/10/2008
Posts: 104
Well, I found it.
I'm running IRAF in FEDORA 9 which is installed inside a VirtualBox.The .fit images I was processing where located in a shared folder between Windows XP and FEDORA. When I moved those images 'inside' FEDORA, the problem disappeared.
Must have been the last VirtualBox update because it didn't do this before.
I'm sorry for all the time you invested in this since it had nothing to do with IRAF and I thank you very much for your patience, once again.
I don't know what I'd do without this forum and Mike Smile
Thanks again!

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