Script using imsurfit
Gordon Petrie wrote on Apr 09, 2009
Hi,
I am trying to use imsurfit to fit a plane to data within a circular region of an image. Right now I have
imsurfit(infile, outfile, 2, 2, cross_terms="no", type_output="fit", region="circle", circle=?)
The x and y coordinates and the radius of the circle need to be passed at "?". On the command line this can be done manually (e.g., circle="430 430 350") but our application requires these numbers to be read from a fits header and fed to imsurfit on the fly. The routine reads these parameters as integers but can't yet feed them to imsurfit. Please could you help?
Many thanks,
Gordon
I am trying to use imsurfit to fit a plane to data within a circular region of an image. Right now I have
imsurfit(infile, outfile, 2, 2, cross_terms="no", type_output="fit", region="circle", circle=?)
The x and y coordinates and the radius of the circle need to be passed at "?". On the command line this can be done manually (e.g., circle="430 430 350") but our application requires these numbers to be read from a fits header and fed to imsurfit on the fly. The routine reads these parameters as integers but can't yet feed them to imsurfit. Please could you help?
Many thanks,
Gordon
Mike Fitzpatrick wrote on Apr 09, 2009
The 'circle' parameter is a simple string: If you are able to construct this string within a script then there's no problem: The HSELECT task can extract keyword values, the '//' operator in the CL will concatenate strings, and if you're doing all of this from a script you should be able to easily construct a string of values derived from header values you can pass in to the 'circle' param of the task.
If you post more info about what you're doing I can suggest some things, if you want the imsurfit.circle param to be able to read a keyword value, then it simply won't happen.
-Mike
If you post more info about what you're doing I can suggest some things, if you want the imsurfit.circle param to be able to read a keyword value, then it simply won't happen.
-Mike
Gordon Petrie wrote on Apr 09, 2009
OK, thank you. I have something working along the lines that you suggested. I am now wondering how to record the coefficients of a polynomial surface fit using imsurfit.
Thanks again,
Gordon
Thanks again,
Gordon
Last post on Apr 09, 2009