<commit_before>#!/usr/bin/env python

""" runastrodriz.py - Module to control operation of astrodrizzle to
        remove distortion and combine HST images in the pipeline.

USAGE: runastrodriz.py [-fhi] inputFilename [newpath]

Alternative USAGE:
    python
    from acstools import runastrodriz
    runastrodriz.process(inputFilename,force=False,newpath=None,inmemory=False)

GUI Usage under Python:
    python
    from stsci.tools import teal
    import acstools
    cfg = teal.teal('runastrodriz')

PyRAF Usage:
    epar runastrodriz

If the '-i' option gets specified, no intermediate products will be written out
to disk. These products, instead, will be kept in memory. This includes all
single drizzle products (*single_sci and *single_wht), median image,
blot images, and crmask images.  The use of this option will therefore require
significantly more memory than usual to process the data.

If a value has been provided for the newpath parameter, all processing will be
performed in that directory/ramdisk.  The steps involved are:
   - create a temporary directory under that directory named after the input file
   - copy all files related to the input to that new directory
   - change to that new directory and run astrodrizzle
   - change back to original directory
   - move (not copy) ALL files from temp directory to original directory
   - delete temp sub-directory

*** INITIAL VERSION
<NAME>  12 Aug 2011: Initial version based on Version 1.2.0 of
                        STSDAS$pkg/hst_calib/wfc3/runwf3driz.py
W.J. Hack  27 Jun 2012: Implement support to process in different directory

<NAME>  24 Aug 2012: Provided interface for in-memory option
"""

# Import standard Python modules
from __future__ import division # confidence high
import os, sys, string,time, shutil
import glob

from stsci.tools import fileutil, asnutil

# Import local modules
import pyfits

__taskname__ = "runastrodriz"

# Local variables
__version__ = "1.3.0"
__vdate__ = "(24-Aug-2012)"

# Define parameters which need to be set specifically for
#    pipeline use of astrodrizzle
pipeline_pars = {'mdriztab':True,
                 'stepsize':10,
                 'output':'',
                 'updatewcs':True,
                 'preserve':False,
                 'resetbits':4096}

#default marker for trailer files
__trlmarker__ = '*** astrodrizzle Processing Version '+__version__+__vdate__+'***\n'<commit_msg>Updated version info for runastrodriz to reflect addition of num_cores parameter.<commit_after>#!/usr/bin/env python

""" runastrodriz.py - Module to control operation of astrodrizzle to
        remove distortion and combine HST images in the pipeline.

USAGE: runastrodriz.py [-fhi] inputFilename [newpath]

Alternative USAGE:
    python
    from acstools import runastrodriz
    runastrodriz.process(inputFilename,force=False,newpath=None,inmemory=False)

GUI Usage under Python:
    python
    from stsci.tools import teal
    import acstools
    cfg = teal.teal('runastrodriz')

PyRAF Usage:
    epar runastrodriz

If the '-i' option gets specified, no intermediate products will be written out
to disk. These products, instead, will be kept in memory. This includes all
single drizzle products (*single_sci and *single_wht), median image,
blot images, and crmask images.  The use of this option will therefore require
significantly more memory than usual to process the data.

If a value has been provided for the newpath parameter, all processing will be
performed in that directory/ramdisk.  The steps involved are:
   - create a temporary directory under that directory named after the input file
   - copy all files related to the input to that new directory
   - change to that new directory and run astrodrizzle
   - change back to original directory
   - move (not copy) ALL files from temp directory to original directory
   - delete temp sub-directory

*** INITIAL VERSION
<NAME>  12 Aug 2011: Initial version based on Version 1.2.0 of
                        STSDAS$pkg/hst_calib/wfc3/runwf3driz.py
<NAME>  27 Jun 2012: Implement support to process in different directory

<NAME>  24 Aug 2012: Provided interface for in-memory option
"""

# Import standard Python modules
from __future__ import division # confidence high
import os, sys, string,time, shutil
import glob

from stsci.tools import fileutil, asnutil

# Import local modules
import pyfits

__taskname__ = "runastrodriz"

# Local variables
__version__ = "1.4.0"
__vdate__ = "(25-Oct-2012)"

# Define parameters which need to be set specifically for
#    pipeline use of astrodrizzle
pipeline_pars = {'mdriztab':True,
                 'stepsize':10,
                 'output':'',
                 'updatewcs':True,
                 'preserve':False,
                 'resetbits':4096}

#default marker for trailer files
__trlmarker__ = '*** astrodrizzle Processing Version '+__version__+__vdate__+'***\n'
{'fraction_non_alphanumeric': 0.06723891273247497, 'fraction_numerical': 0.015532393214796648, 'mean_word_length': 3.578110383536015, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2617760', 'n_tokens_mistral': 1440, 'n_tokens_neox': 1359, 'n_words': 562}