Welcome to iraf.net Monday, May 20 2024 @ 05:49 AM GMT


 Forum Index > Archives > Sitemail Archives
 `hedit' in simple script
   
Anonymous: Guest
 03/06/2004 01:18AM (Read 1049 times)  



Dear IRAF Helper,If I run the following little script on image `test.fits' to change its
current value of VOBS to "9999.": # do_hedit_test.cl
hedit test.fits VOBS "9999." verify+by typing `cl < do_hedit_test.cl', the following line appears in my IRAF
window:
test,VOBS (4841. -> 9999.): update test ? (yes): cl>BUT the value of `VOBS' does NOT change to "9999."; it remains at "4841."If, however, I simply lift the `hedit test.fits ...' line out of the
script and enter it into my IRAF window, then all works fine (the `update'
and `verify' parameters are both set to `yes' in my parameter set for
`hedit', I get asked a question twice, and VOBS does change to "9999.").Why is this, and how can I properly execute a `hedit' command from within
a simple script?Will be most grateful for any pointers you may give me.Cheers,
Francois

 
Anonymous: Guest
 03/06/2004 01:18AM  



Hi Francois,
A CL redirection like yours redirects all input, including the
response to the parameter prompt triggered by the 'verify' param. What's
happening is that the parameter prompt is seeing the EOF of the script and
so not updating the value since the verify returns a false value. To fix
this you can disable the 'verify' param, or else make this a procedure
script and execute it as a task.
Hope this helps, let us know if you still have questions.Cheers,
Mike Fitzpatrick

 
   

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