Welcome to iraf.net Thursday, May 02 2024 @ 05:50 AM GMT


 Forum Index > Archives > Sitemail Archives
 script question of 19 September revised
   
Anonymous: Guest
 09/21/2005 07:28PM (Read 7208 times)  



---------- Forwarded message ----------
Date: Mon, 19 Sep 2005 22:36:25 +0000 (GMT)
From: Astronomer Account <astronomer@mcs.as.utexas.edu>
To: iraf@noao.edu
Subject: script questions
Dear IRAF -I am trying to run a script that
1) takes a test snap
2) does an offset
3) repeats
4) gets out of the loop when you change nexpo to be .gt. 1I would like the test snap to use the (just) previous
value for exptime that I gave it, but instead it
keeps using the initial value, i.o.w. the test command
doesn't learn exptime in the script, even though it
learns it outside of the script.I've simplified the script from my presentation of the
question two days ago:# NB - this procedure script must be registered with:
# task $q5 = /home/lrs/astronomer/ICE/scripts/q5.clprocedure q5 (zz1,zz2)real zz1
real zz2begin
test.nexpo = 1
tv.disp.z1 = zz1
tv.disp.z2 = zz2
clear
# amode
test(nexpo=1,imagetyp="object")
tv.disp(image="test.fits",frame=1,zscale=no,zrange=no)
beep
print (" ")
print (" Set nexpo to 2 to end sequence:")
while ( test.nexpo == 1 ) {
clear
# mkoffx4
test(nexpo=1,imagetyp="object")
tv.disp(image="test.fits",frame=1,zscale=no,zrange=no)
beep
print (" ")
print (" Set nexpo to 2 to end sequence:")
}
end
Problem -if you run successive test commands outside of the script,
it revises the exposure time default to be the one you
just used: tests.exptime learnsbut if you run repeated loops of this script, the successive
test commands don't learn the new value for the exptime, but
keep giving you an old default; it will speed up the application
if once one finds a good exposure time, that will become the
default in the following stepsthanksJohn

 
Anonymous: Guest
 09/21/2005 07:28PM  



Hi John,> I am trying to run a script that
> 1) takes a test snap
> 2) does an offset
> 3) repeats
> 4) gets out of the loop when you change nexpo to be .gt. 1
>
> I would like the test snap to use the (just) previous
> value for exptime that I gave it, but instead it
> keeps using the initial value, i.o.w. the test command
> doesn't learn exptime in the script, even though it
> learns it outside of the script.I gather you are observing on Kitt Peak and you are talking about the
ccdacq tests command? Or is UT using ICE on your own telescopes? Or
is this a task in the arcon package at CTIO?> # NB - this procedure script must be registered with:
> # task $q5 = /home/lrs/astronomer/ICE/scripts/q5.cl
>
> procedure q5 (zz1,zz2)
>
> real zz1
> real zz2
>
> beginQ5 is a procedure script with two query parameters, zz1 and zz2. It
should be defined as: task q5 = /home/lrs/astronomer/ICE/scripts/q5.clNote no dollar sign in front of the task name. That use of the
dollar sign defines a task with no parameters.If you are on Kitt Peak, I don't think any of our machines have a /
home/lrs directory. What machine are you running this on? I'm
confused about the context of your question.> if you run successive test commands outside of the script,
> it revises the exposure time default to be the one you
> just used: tests.exptime learnsThe nexpo, imagetype and exptime parameters are query parameters and
the task should be called from a script like: tests (1, "object", exp1)This may make a difference.On the other hand the tests task forces the exposure time to 0.0 for
imagetyp = "zero". What type of images are you acquiring when you
see the problem?> but if you run repeated loops of this script, the successive
> test commands don't learn the new value for the exptime, but
> keep giving you an old default; it will speed up the application
> if once one finds a good exposure time, that will become the
> default in the following stepsTry adding the magic incantation "cache tests" near the top of the q5
task.> #** here is the problem: it keeps using the initial expo value
> # say 10 seconds, as the default for exptime; I want it to use
> # the value that I last gave it for exptime; I want the new
> # value to become the next default, so if 20 seconds is a better
> # time, I don't want it to keep askingWell, it is going to be tricky in any event to get it to ask a
question when you want it to, and stop asking when you are happy with
the value. You might get it to update the default, however, such
that just pressing the "return" key at the right moment will accept
the default.Rob Seaman
NOAO/IRAF

 
Anonymous: Guest
 09/21/2005 07:28PM  



Rob -Thanks, I was leaving in the $ on the tasknames-with-parameters
by mistake. I still don't get the exptime to be learned when
running the test exposure inside the script, but it doesn't matter much.I'm resident astronomer at the HET, and the icex version has
a command "test" that takes a test snap. It asks for the
exposure time each time with a "frozen" default, not a default
that learns. It's really all right, but I thought I'd check if
there were an easier way.Thanks for the tips.JohnOn Wed, 21 Sep 2005, Rob Seaman wrote:> Hi John,
>
> > I am trying to run a script that
> > 1) takes a test snap
> > 2) does an offset
> > 3) repeats
> > 4) gets out of the loop when you change nexpo to be .gt. 1
> >
> > I would like the test snap to use the (just) previous
> > value for exptime that I gave it, but instead it
> > keeps using the initial value, i.o.w. the test command
> > doesn't learn exptime in the script, even though it
> > learns it outside of the script.
>
> I gather you are observing on Kitt Peak and you are talking about the
> ccdacq tests command? Or is UT using ICE on your own telescopes? Or
> is this a task in the arcon package at CTIO?
>
> > # NB - this procedure script must be registered with:
> > # task $q5 = /home/lrs/astronomer/ICE/scripts/q5.cl
> >
> > procedure q5 (zz1,zz2)
> >
> > real zz1
> > real zz2
> >
> > begin
>
> Q5 is a procedure script with two query parameters, zz1 and zz2. It
> should be defined as:
>
> task q5 = /home/lrs/astronomer/ICE/scripts/q5.cl
>
> Note no dollar sign in front of the task name. That use of the
> dollar sign defines a task with no parameters.
>
> If you are on Kitt Peak, I don't think any of our machines have a /
> home/lrs directory. What machine are you running this on? I'm
> confused about the context of your question.
>
> > if you run successive test commands outside of the script,
> > it revises the exposure time default to be the one you
> > just used: tests.exptime learns
>
> The nexpo, imagetype and exptime parameters are query parameters and
> the task should be called from a script like:
>
> tests (1, "object", exp1)
>
> This may make a difference.
>
> On the other hand the tests task forces the exposure time to 0.0 for
> imagetyp = "zero". What type of images are you acquiring when you
> see the problem?
>
> > but if you run repeated loops of this script, the successive
> > test commands don't learn the new value for the exptime, but
> > keep giving you an old default; it will speed up the application
> > if once one finds a good exposure time, that will become the
> > default in the following steps
>
> Try adding the magic incantation "cache tests" near the top of the q5
> task.
>
> > #** here is the problem: it keeps using the initial expo value
> > # say 10 seconds, as the default for exptime; I want it to use
> > # the value that I last gave it for exptime; I want the new
> > # value to become the next default, so if 20 seconds is a better
> > # time, I don't want it to keep asking
>
> Well, it is going to be tricky in any event to get it to ask a
> question when you want it to, and stop asking when you are happy with
> the value. You might get it to update the default, however, such
> that just pressing the "return" key at the right moment will accept
> the default.
>
> Rob Seaman
> NOAO/IRAF
>

 
   

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