Parameter files
khl wrote on Jun 29, 2009
Hi,
I want applications (like phot, daofind, addstar, etc.) to read in parameter files (like daopars, photpars, findpars).
It would be greatly helpful if you knew how to do this and could tell me.
How the parameter file should look like, format of its name (if one is required), how to type it into with the rest of the command (datapars="stuff"), and the like.
Thanks!!!
Ki
I want applications (like phot, daofind, addstar, etc.) to read in parameter files (like daopars, photpars, findpars).
It would be greatly helpful if you knew how to do this and could tell me.
How the parameter file should look like, format of its name (if one is required), how to type it into with the rest of the command (datapars="stuff"), and the like.
Thanks!!!
Ki
Mike Fitzpatrick wrote on Jun 29, 2009
I'm not sure I understand your question. If you're asking how to set pset parameters then you simply treat them like any other task, e.g. type the pset name and you'll be put into epar or else 'epar datapars' specifically to set the values. When you run a task like PHOT, the task will take care of opening the pset to read the values. If you want to override a parameter on the command-line, you can do it explicitly with something like
If you want to save parameters to a file, use e.g. "dpar datapars" and save the results in a file. To use this file, set the task 'datapars' parameter to the name of the file. Hope this helps, if you still have questions write back.
-Mike
cl> phot dev$pix datapars.scale=2.0 ....If you want to save parameters to a file, use e.g. "dpar datapars" and save the results in a file. To use this file, set the task 'datapars' parameter to the name of the file. Hope this helps, if you still have questions write back.
-Mike
Francisco Valdes wrote on Jun 29, 2009
I am also not sure about what you want. But a common way to do things is to create a file like:
Then when you want to set the parameters before running some data you do
where myparams would be the file name. It should be obvious the format is task.parameter and string parameter values are quoted while others are not. Note also that you can mix parameters from many tasks in this way. This is the format you get when you "dump" parameters with "dpar task". So you can create the file by using epar and then use dpar redirected to a file. I do this all the time.
The advantage of this method over writing parameter sets is that it is more intuitive from a user's point of view as opposed to an IRAF programmer.
Yours,
Frank Valdes
phot.radplots = no
phot.coords = "mycoords.dat"
datapars.scale = 1.3
...
Then when you want to set the parameters before running some data you do
cl < myparams
where myparams would be the file name. It should be obvious the format is task.parameter and string parameter values are quoted while others are not. Note also that you can mix parameters from many tasks in this way. This is the format you get when you "dump" parameters with "dpar task". So you can create the file by using epar and then use dpar redirected to a file. I do this all the time.
The advantage of this method over writing parameter sets is that it is more intuitive from a user's point of view as opposed to an IRAF programmer.
Yours,
Frank Valdes
Last post on Jun 29, 2009