Updatenpol¶
updatenpol
: Update the header of ACS file(s) with the names of new
NPOLFILE
and D2IMFILE
reference files for use with the
C version of MultiDrizzle (astrodrizzle).
Authors: | Warren Hack |
---|---|
License: | |
Usage: | This task can be run from the operating system command line with: updatenpol [options] input [refdir]
|
Command-line Options: | |
|
Warning
It will ask for the names of the NPOLFILE
and D2IMFILE
for
EACH separate INPUT file when the option -i
has been specified.
Example: | 1. This command will update all the FLT files in the current directory
with the new updatenpol *flt.fits myjref$
|
---|---|
Compatability with MultiDrizzle: | |
The new version of |
-
drizzlepac.updatenpol.
find_d2ifile
(flist, detector)[source]¶ Search a list of files for one that matches the detector specified.
-
drizzlepac.updatenpol.
find_npolfile
(flist, detector, filters)[source]¶ Search a list of files for one that matches the configuration of detector and filters used.
-
drizzlepac.updatenpol.
getHelpAsString
(docstring=False, show_ver=True)[source]¶ return useful help from a file in the script directory called __taskname__.help
-
drizzlepac.updatenpol.
help
(file=None)[source]¶ Print out syntax help for running astrodrizzle
Parameters: - file : str (Default = None)
If given, write out help to the filename specified by this parameter Any previously existing file with this name will be deleted before writing out the help.
-
drizzlepac.updatenpol.
run
(configobj=None, editpars=False)[source]¶ Teal interface for running this code.
-
drizzlepac.updatenpol.
update
(input, refdir='jref$', local=None, interactive=False, wcsupdate=True)[source]¶ Updates headers of files given as input to point to the new reference files NPOLFILE and D2IMFILE required with the new C version of MultiDrizzle.
Parameters: - input : string or list
- Name of input file or files acceptable forms:
- single filename with or without directory
- @-file
- association table
- python list of filenames
- wildcard specification of filenames
- refdir : string
Path to directory containing new reference files, either environment variable or full path.
- local : boolean
Specifies whether or not to copy new reference files to local directory for use with the input files.
- interactive : boolean
Specifies whether or not to interactively ask the user for the exact names of the new reference files instead of automatically searching a directory for them.
- updatewcs : boolean
Specifies whether or not to update the WCS information in this file to use the new reference files.
Notes
Warning
This program requires access to the
jref$
directory in order to evaluate the DGEOFILE specified in the input image header. This evaluation allows the program to get the information it needs to identify the correct NPOLFILE.The use of this program now requires that a directory be set up with all the new NPOLFILE and D2IMFILE reference files for ACS (a single directory for all files for all ACS detectors will be fine, much like jref). Currently, all the files generated by the ACS team has initially been made available at:
/grp/hst/acs/lucas/new-npl/
The one known limitation to how this program works comes from confusion if more than 1 file could possibly be used as the new reference file. This would only happen when NPOLFILE reference files have been checked into CDBS multiple times, and there are several versions that apply to the same detector/filter combination. However, that can be sorted out later if we get into that situation at all.
Examples
A set of associated images specified by an ASN file can be updated to use the NPOLFILEs and D2IMFILE found in the local directory defined using the
myjref$
environment variable under PyRAF using:>>>import updatenpol >>>updatenpol.update('j8bt06010_asn.fits', 'myref$')
Another use under Python would be to feed it a specific list of files to be updated using:
>>> updatenpol.update(['file1_flt.fits','file2_flt.fits'],'myjref$')
Files in another directory can also be processed using:
>>> updatenpol.update('data$*flt.fits','../new/ref/')