Welcome to iraf.net Saturday, April 27 2024 @ 10:28 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 cl Script
   
craigswenson
 07/11/2007 06:28PM (Read 4233 times)  
++---
Junior

Status: offline


Registered: 07/10/2007
Posts: 23
I've been searching the forums, but can't find an answer to my question. I'm writing several cl scripts and would like to know if it is possible to enter a carriage return command into my script.I'm using DAOPhot and after almost every command I run, whether is be pstselect, psf, etc., I have to hit return 8 or so times, just to accept all of the default values and I would like to bypass having to do that.Does a command line command for 'carriage return' even exist in IRAF scripting language?Thanks.

 
Profile Email
 Quote
fitz
 07/11/2007 06:28PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The prompts are issued when the required query parameter isn't supplied on the command line or aren't satisfied properly in the pset if one is being used. If you get the prompt then I'd look first at how you're calling the tasks in the script (or post an example here). Otherwise, you can always redirect input from a file of newlines at the risk of responding to too few/many prompts, or change the 'mode' parameter of the task params so they're not queried at all (and risk it just not running properly).Cheers,
-Mike

 
Profile Email
 Quote
craigswenson
 07/11/2007 06:28PM  
++---
Junior

Status: offline


Registered: 07/10/2007
Posts: 23
I'm not sure what you mean by setting the mode not to query at all. How do I do that? I assume that you're referring to the (mode=ql that is the last parameter in many of the parameter files. What other options are available?Thanks

 
Profile Email
 Quote
fitz
 07/11/2007 06:28PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
A value of 'h' will mean "hidden", i.e. you won't be prompted. Note however there is a difference between the task 'mode' parameter that affects all parameters and how/whether they are learned (the 'l' in "ql", where 'q' is "query") and stored in the uparm directory, and the mode of an individual parameter. You can change the latter by doing e.g.[code:1:d4a1f60943]daophot> pstselect.image.p_mode="h"[/code:1:d4a1f60943]And then the 'image' param will now be hidden (but may not have a valid value!)-Mike

 
Profile Email
 Quote
craigswenson
 07/11/2007 06:28PM  
++---
Junior

Status: offline


Registered: 07/10/2007
Posts: 23
Thanks Mike, that does exactly what I want it to do, but, I have one more question. How do I 'unhide' an individual parameter file? Do I set p_mode="ql" just like I would for the task 'mode' parameter if I want to be queried again, or does it have its own set of commands that I need to know.Thanks in advance.

 
Profile Email
 Quote
fitz
 07/11/2007 06:28PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The p_mode is an attribute of an individual parameter (the full set is: "p_name", "p_type", "p_mode", "p_value", "p_minimum", "p_maximum", "p_prompt", "p_filename", "p_length", "p_default", "p_xtype"), the 'mode' parameter applies to how the CL treats the param file for the entire task. More properly p_mode should be set to 'a' (auto) if you want to be asked for the value each time, and 'h' to hide the prompt. These can be combined with 'l' to learn the value but note that when you change a p_<attr> it affects only the version in your uparm directory and the change will be lost when you unlearn the task or do a new MKIRAF.For fun, try setting the 'mode' param for a task to be 'm' and see what happens, e.g.[code:1:5faccb0c93]cl> dir mode=m[/code:1:5faccb0c93]Cheers,
-Mike

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