Joint Astronomy Centre
Show document only
JAC Home
JCMT
UKIRT
Contact info
JAC Divisions
OMP
Outreach
Seminars
Staff-only Wiki
Weather
Web Cameras
____________________

JCMT home
Observing at JCMT
OMP Observation Manager
Telescope
Instrumentation
Schedule
Data Archive
Future Developments
Legacy Surveys
Newsletter & Publications
ORAC-DR Recipe Descriptions

REDUCE_SCIENCE_LINEFOREST

There are currently two variants to this recipe Back to the recipes.

REDUCE_SCIENCE_LINEFOREST

Description: This recipe reduces an ACSIS science observation. It does so by first converting a time-series cube (or more than one, as the case may be) as written by the ACSIS specwriter into a spatial/spectral cube. This cube is then coadded to other cubes in the same group to form a higher signal-to-noise ratio cube.
Output: For single observations: A spatial/spectral cube whose filename is of the form aYYYYMMDD_NNNNN_SS_MMMM_cube.sdf, where YYYYMMDD is the UT date, NNNNN is the zero-padded observation number, SS is the zero-padded subsystem number, and MMMM is the first zero-padded sub-scan number for the given observation and subsystem.

For group files: A spatial/spectral cube whose filename is of the form gaYYYYMMDD_N, where YYYYMMDD is the UT date, and N is the group number. This is the coadded group file.

Related recipes: REDUCE_SCIENCE
Primitives: Click on a link to take you to a description of each primitive.

_REDUCE_SCIENCE_STEER_
_INSTRUMENT_HELLO_
_QA_WITH_MASKING_
      _SORT_TIMESERIES_
      _QA_SYSTEM_TEMPERATURE_
      _QA_SENSITIVITY_VARIATION_
      _QA_TIMESERIES_CHECK_
      _QA_RMS_TSYS_CONSISTENCY_
_REMOVE_FREQUENCY_ENDS_ LOWER=2.75 UPPER=3 AXIS=1
_MERGE_HYBRID_MODE_
_SUBTRACT_TIMESERIES_SIGNAL_
_SET_TAG_ TAG=SUBTRACTED_TIMESERIES_SIGNAL
_CREATE_CUBE_FRAME_ SPREAD=nearest
      _GET_MAKECUBE_PARAMS_
_REMOVE_BASELINE_ GROUP=0 ORDER=1 METHOD=single TAG=1
_CREATE_MOMENTS_MAPS_ GROUP=0 MOMENTS=integ,iwc TAG=integ
_CREATE_NOISE_MAP_ GROUP=0 QA=1
_RETRIEVE_TAG_ TAG=SUBTRACTED_TIMESERIES_SIGNAL
_CREATE_CUBE_GROUP_ SPREAD=nearest
_REMOVE_BASELINE_ GROUP=1 ORDER=1 METHOD=single TAG=1
_CREATE_MOMENTS_MAPS_ GROUP=1 MOMENTS=integ,iwc TAG=integ
_CREATE_NOISE_MAP_ GROUP=1 QA=1


REDUCE_SCIENCE_LINEFOREST_ADV

Description: This recipe reduces an ACSIS science observation. It does so by first converting a time-series cube (or more than one, as the case may be) as written by the ACSIS specwriter into a spatial/spectral cube. This cube is then coadded to other cubes in the same group to form a higher signal-to-noise ratio cube.

After the time-series manipulation has been done to every member of the current group, every member is run through MAKECUBE to create a group spatial cube. This cube then has its baseline removed through a smoothing process, and moments maps are created.

A baseline mask formed from the group cube is run through UNMAKECUBE to form baseline masks for the input time-series data, which are then baselined. The baselined time-series data are then run through MAKECUBE to create observation cubes, from which moments maps are created.

Output: For single observations: A spatial/spectral cube whose filename is of the form aYYYYMMDD_NNNNN_SS_MMMM_cube.sdf, where YYYYMMDD is the UT date, NNNNN is the zero-padded observation number, SS is the zero-padded subsystem number, and MMMM is the first zero-padded sub-scan number for the given observation and subsystem.

For group files: A spatial/spectral cube whose filename is of the form gaYYYYMMDD_N, where YYYYMMDD is the UT date, and N is the group number. This is the coadded group file.

For time-series data:
_tss : median removed from time series
_thr : thresholded time series
_em : noisy ends removed
_tsmask: baseline region only mask
_msk : non-baseline regions
_bl : baseline removed

For spatial cubes:
_cube : baseline removed cube
_blmask : baseline region mask

For group cubes:
_cube : cube
_blmask : baseline region mask
_bl : baseline removed cube

For moments maps:
_integ : integrated intensity
_iwc : (intensity weighted) velocity map

Notes: The 'nearest' method is used for creating cubes with MAKECUBE
Related recipes: REDUCE_SCIENCE_ADV
Primitives: Click on a link to take you to a description of each primitive.

_STOP_PROCESSING_IF_SIMULATED_
_REDUCE_SCIENCE_STEER_ COPY_FRAME=0
_INSTRUMENT_HELLO_
_QA_WITH_MASKING_
      _SORT_TIMESERIES_
      _QA_SYSTEM_TEMPERATURE_
      _QA_SENSITIVITY_VARIATION_
      _QA_TIMESERIES_CHECK_
      _QA_RMS_TSYS_CONSISTENCY_
_REMOVE_FREQUENCY_ENDS_ LOWER=2.75 UPPER=3 AXIS=1
_REMOVE_FREQUENCY_ENDS_ LOWER=2.75 UPPER=3 AXIS=1
_MERGE_HYBRID_MODE_
_THRESHOLD_DATA_ LOW=-150 HIGH=150 NEWLOW=bad NEWHIGH=bad
_SUBTRACT_TIMESERIES_SIGNAL_
_SET_TAG_ TAG=POST_TIMESERIES_REMOVAL
_ITERATIVE_GROUP_PRODUCTION_ SPREAD=nearest FREQUENCY_SMOOTH=25 SPATIAL_SMOOTH=3 ORDER=5 MOMENTS=integ,iwc
      _CREATE_CUBE_GROUP_ TILEBORDER=2
            _GET_MAKECUBE_PARAMS_
      _REMOVE_BASELINE_THROUGH_SMOOTHING_ GROUP=1
            _CREATE_BASELINE_MASK_
      _CREATE_MOMENTS_MAPS_THROUGH_SMOOTHING_ GROUP=1
            _CREATE_BASELINE_MASK_
      _CREATE_NOISE_MAP_ GROUP=1 QA=1
      _QA_MAP_RMS_FREQ_UNIFORMITY_ GROUP=1
      _RECREATE_MASKED_TIMESERIES_
      _REMOVE_BASELINE_MASKED_TIMESERIES_
      _CREATE_CUBE_FRAME_FROM_GROUP_ TILEBORDER=2
      _CREATE_MOMENTS_MAPS_THROUGH_SMOOTHING_ GROUP=2
      _CREATE_NOISE_MAP_ GROUP=2


_STOP_PROCESSING_IF_SIMULATED_
Description: This primitive examines the SIMULATE header of the current Frame, and if it's true, processing is halted. The ORAC_TERM constant is returned, which causes the pipeline to stop processing the current Frame and go on to the next one.
Notes: This primitive is only called in _ADV scripts and not in standard recipes
Back to top
_REDUCE_SCIENCE_STEER_
Description: Set up steering parameters for REDUCE_SCIENCE recipes.
Arguments: COPY_FRAME = LOGICAL (Given)
Whether or not to copy Frame products to Group products when there's only one member in the group. [1]
Back to top
_INSTRUMENT_HELLO_
Description: Instrument specific initialisation. Any instrument specific initialisation for the spectroscopy pipeline is done in the instrument specific _INSTRUMENT_HELLO_ primitive. This is called close to the start of _SPECTROSCOPY_HELLO_ near the start of processing for each frame. If a given instrument does not require any specific initialisation, it should not have an _INSTRUMENT_HELLO_ primitive, and this generic, null, one will be called instead.
Back to top
_QA_WITH_MASKING_
Description: Run quality assurance tests and mask out spectra that fail a consistency check between Tsys and observed RMS. This primitive performs quality assurance tests on raw timeseries data, then uses information gleaned from those tests to mask out bad data.
Arguments: MASK = STRING (Given)
When QA tests are performed, the various JCMT Legacy Surveys have different thresholds for what counts as bad data. If this string is set, then that given survey's thresholds will be used when masking out data. If it is not set, then the value of the SURVEY header for the current Frame object will be used. If that is not defined, then the default Telescope thresholds (which are much less stringent than survey thresholds) will be used. Case-insensitive. ['telescope']

SURVEY_OVERRIDE = STRING (Given)
If defined, override the survey listed in the SURVEY header. The given survey will be used for QA thresholds. ['']

Output: _ts : time series data sorted in time order (See _SORT_TIMESERIES_)
_tsmask : masked time series data
Tasks: Primitives: _SORT_TIMESERIES,_QA_SYSTEM_TEMPERATURE_, _QA_SENSITIVITY_VARIATION_, _QA_TIMESERIES_CHECK_ and _QA_RMS_TSYS_CONSISTENCY_
Back to top
_SORT_TIMESERIES_
Description: Takes a set of timeseries cubes and sorts the timeslices into increasing time order. It also masks bad detectors and purges detectors with no good data in them.
Arguments: GENVAR = LOGICAL (Given)
Whether or not to generate a variance component based on Tsys, using the radiometer formula. [0]

MASK = LOGICAL (Given)
Whether or not to mask bad detectors. [1]

PURGE = LOGICAL (Given)
Whether or not to purge detectors that have no good data values in them. [1]

Notes: The list of bad receptors to mask is obtained via the bad_receptor_list() accessor of the current Cal object.
Output: _ts: time series data sorted in time order
Back to top
_QA_SYSTEM_TEMPERATURE_
Description: Runs system temperature QA check. Tsys values are retrieved from MORE.ACSIS.TSYS. It then uses the stats to get the mean Tsys value for the array and for each receptor. If a receptor is bad (mean Tsys <= 0) this is flagged as such.
Back to top
_QA_SENSITIVITY_VARIATION_
Description: Calculates the rms values from the line-free regions of each spectrum. It initially looks up object in pointing catalogue, masks out the line and calculates the rms from the remaining regions. If it is not in the catalogue it uses mfittrend (METHOD=single) and masks the baselined file. It uses stats to get the sigma (mean rms) across all detectors using the inner 85% of the spectrum to avoid noisy end channels. If a receptor is bad (rms <= 0) this is flagged as such.
Back to top
_QA_TIMESERIES_CHECK_
Description: Tests the various Tsys and rms numbers against the QA criteria. It runs the QA analysis on each requested survey filtering out those receptors flagged as bad. It then runs an rms test for remaining receptors. If any of the tests fail, then the whole survey QA test fails.
Back to top
_QA_RMS_TSYS_CONSISTENCY_
Description: Tests the calculated rms vs the measured rms to make sure the two agree. There is the option to mask out those that fail to meet a given threshold. It extracts the variance component (.VARIANCE) and calculates the rms by taking the square root; this rms is then compared to the rms calculated using the radiometer formula. If the 2 rms values differ by more than a given amount, then the spectrum fails the test. If a given percentage of spectra out of the entire observation fail the test, then the observation is flagged as either questionable or bad.
Arguments: MASK = STRING (Given)
The name of the survey to use when masking spectra. The special "telescope" survey can be used to mask spectra failing the less-stringent telescope thresholds. If left undefined, then no spectra will be masked. ['']
Output: _tsmask : masked time series data
Back to top
_REMOVE_FREQUENCY_ENDS_
Description: Remove the ends of a cube's frequency axis. This primitive removes the ends of a cube's frequency axis by copying out a central portion of the cube to a new file. This primitive differs from _MASK_FREQUENCY_ENDS_ in that this primitive does not create a cube with masked-out bad pixels on either ends of the frequency axis, whereas _MASK_FREQUENCY_ENDS_ does.
Arguments: AXIS = INTEGER (Given)
The axis to trim. For time-series data this should be set to 1. For spatial cubes this should be set to 3. [3]

LOWER = REAL (Given)
The percentage of the total frequency range to trim from the lower end of the frequency range. For example, if a cube has 1024 frequency channels, and the percentage to trim is 10%, then 102 channels will be trimmed from the lower end. [undef]

PERCENT = REAL (Given)
The percentage of the total frequency range to trim from either end. For example, if a cube has 1024 frequency channels, and the percentage to trim is 10%, then 102 channels will be trimmed from either end. [10.0]

UPPER = REAL (Given)
The percentage of the total frequency range to trim from the higher end of the frequency range. For example, if a cube has 1024 frequency channels, and the percentage to trim is 10%, then 102 channels will be trimmed from the upper end. [undef]

Notes: This primitive will only remove the ends if the Frame's user header SPECTRAL_TRIMMED does not exist or it exists and is false.

If either of the LOWER or UPPER parameters are given, these will be used. Otherwise, if both of them are left undefined, then the PER- CENT parameter will be used.

Output: _em : Cube with masked frequency ends
Tasks: KAPPA: NDFCOPY, NDFTRACE
Back to top
_MERGE_HYBRID_MODE_
Description: Merge hybrid mode observations in the frequency domain. This primitive operates on hybrid mode observations. It first deter- mines a DC-level offset between corresponding subscan observations, using the overlap region to determine statistics. If no overlap region exists, then the entire spectrum is used. The DC offset is added to or removed from the subscan spectra, and the corresponding subscans are mosaicked together to form time-series cubes with a greater frequency extent.
Notes: This primitive is suitable for ACSIS data taken in hybrid mode.

This primitive only operates if the ISHYBRID user header is set for the current Frame object.

This primitive currently only operates on observations with one subscan.

*** Must check performance when lines occur in overlap region ***

Output: _dc : the DC corrected time-series cubes
_merge : the merged time-series cube
Tasks: KAPPA: COLLAPSE, MANIC, MATHS, NDFTRACE, WCSMOSAIC
Back to top
_THRESHOLD_DATA_
Description: Threshold data lower and/or higher than given values. This recipe thresholds data values that are lower and/or higher than given values. It is essentially a wrapper around the KAPPA THRESH application.
Arguments: HIGH = REAL (Given)
The upper threshold value within the input array. [0]

LOW = REAL (Given)
The lower threshold value within the input array. [0]

NEWHIGH = REAL (Given)
The value to which all input values greater than the upper thresh- old (HIGH parameter) are set. This can be set to "bad", in which case the bad value is substituted. [0]

NEWLOW = REAL (Given)
The value to which all input values smaller than the lower thresh- old (LOW parameter) are set. This can be set to "bad", in which case the bad value is substituted. [0]

Output: _thr : the thresholded data
Tasks: KAPPA: THRESH
Back to top
_SUBTRACT_TIMESERIES_SIGNAL_
Description: This primitive subtracts a gross timeseries signal from raw heterodyne data. It first creates a median instrument spectrum by collapsing along the receptor axis, then collapses along the central 2/3rds of the channel axis. This creates a time-series spectrum, which is then grown to the size of the input cube. The time-series cube is subtracted from the input cube. The median value of the time-series spectrum is added back to the subtracted cube.
Notes: The receptor axis is assumed to be the 2nd axis of the input cube.

This primitive operates on every file in the current Frame.

Back to top
_SET_TAG_
Description: Tag the current Frame for subsequent retrieval. This primitive can be used to tag the current Frame for subsequent retrieval. In conjunction with the _RETRIEVE_TAG_ primitive, this primitive can be used to "jump back" to a previous step in processing.
Arguments: TAG = STRING (Given)
The string to tag the current Frame with. This argument is mandatory, and an error will be thrown if it is not defined.
Back to top
_CREATE_CUBE_FRAME_
Description: Create a cube from a time-series ACSIS observation and insert it in the Frm object. This primitive takes a time-series ACSIS cube and, using SMURF/MAKE- CUBE, transforms it into a spatial/spectral cube.
Arguments: BYTES_PER_PIXEL = INTEGER (Given)
The number of bytes per pixel. [4]

DETECTORS = STRING (Given)
A comma-separated list of detectors to use when creating the cube. If blank or undefined, all detectors will be used. ['']

MAXSIZE = INTEGER (Given)
The maximum size, in bytes, of the output cube. This value does not include extra information such as variance or weight arrays, FITS headers, or any other NDF extensions. [512000000]

PARAMS = STRING (Given)
An optional array which consists of additional parameters required by the Sinc, SincSinc, SincCos, SincGauss, Somb, SombCos, and Gauss spreading methods (see parameter SPREAD). See documentation for the PARAMS parameter for MAKECUBE. ['']

SPREAD = STRING (Given)
The interpolation method to use when regridding the cube. This can be any of those allowed by MAKECUBE, listed in the SPREAD parameter. ['nearest']

SUFFIX = STRING (Given)
Override the default "_cube" suffix with a new value. This is useful when processing an iterative result where we do not want to improve the initial product (the whole point being to retain it). PRODUCT = STRING (Given) Override the default "cube" product designation.

Output: A cube whose filename is of the form aYYYYMMDD_NNNNN_SS_cube.sdf, where YYYYMMDD is the UT date, NNNN is the zero-padded observation number, and SS is the zero-padded subsystem number.
Tasks: SMURF: MAKECUBE
Primitives: _GET_MAKECUBE_PARAMS_, _GET_TILE_DIMENSIONS_
Notes: The values for the MAKECUBE parameters PIXSIZE and CROTA can be found in _GET_MAKECUBE_PARAMS_ for grid and jiggle maps or_GET_MAKECUBE_PARAMS_SCAN_ for scans.
Back to top
_GET_MAKECUBE_PARAMS_
Description: This primitive uses information in FITS headers to calculate MAKECUBE parameters appropriate for an ACSIS observation.
Arguments: PARAMS = STRING (Returned
The parameters that can be passed to MAKECUBE for the given observation. The parameters do not include the IN or OUT parameters.

PASS = INTEGER (Given)
The MAKECUBE pass number. 1 for first pass, 2 for second pass. The first pass is typically used to determine output bounds without creating a cube in order to determine whether or not to create tiles. [1]

TYPE = STRING (Given)
The type of observation done. This must be one of 'jiggle', 'raster', 'pointing', 'focus', or 'grid'. Case-insensitive. ['']

Notes: HARP4 and HARP5 jiggles get their pixel scale set to 7.5 or 6 respectively. Grid and focus observations just use autogrid.
Tasks: Primitives: _GET_MAKECUBE_PARAMS_SCAN_ [if TYPE = raster], _GET_MAKECUBE_PARAMS_POINTING_ [if TYPE = pointing]
Back to top
_GET_MAKECUBE_PARAMS_SCAN_
Description: This primitive uses information in FITS headers to calculate MAKECUBE parameters appropriate for an ACSIS scan (raster) observation.
Notes: The pixel scale is obtained by multiplying SCAN_VEL and STEPTIME headers, and the position angle comes from the MAP_PA header. The position angle is forced to be between -45 and 45 degrees.
Back to top
_REMOVE_BASELINE_
Description: This primitive removes the baseline from each spectrum in a cube, using spectral windows that are assumed to be free of spectral lines. Method=single masks each line independently. The dispersion for the clipping of outliers within a line is the standard deviation within that line
Arguments: EDGES = REAL (Given)
Percentage of the full range to fit on either edge of the spectrum. [0]

GROUP = LOGICAL (Given)
Whether or not to operate on the current Group object. [0]

ORDER = INTEGER (Given)
The order of the fit to use for the baseline. Zero (the default) is a constant, one is linear, etc. [0]

METHOD = STRING (Given)
The method used to define the baseline regions in automatic mode. The allowed values are 'region', 'single', and 'global'. This is not used if the EDGES argument is defined. ['region']

TAG = LOGICAL (Given)
Whether or not to tag the resulting cubes as 'reduced'. [0]

Tasks: KAPPA: MFITTREND, NDFTRACE
Back to top
_CREATE_MOMENTS_MAPS_
Description: Create moments maps by collapsing along spectral axis. This primitive is used to create moments maps. The input cube is simply collapsed along the spectral axis, using the requested estimator.
Arguments: GROUP = INTEGER (Given)
How to process group files. 0 means use the current Frame object. 1 means use the current Group object. 2 means use each Frame member of the current Group object. [0]

MOMENTS = STRING (Given)
The moment maps to create. These are any of the values allowed for the ESTIMATOR parameter to the COLLAPSE method, but in reality this should probably be 'integ', 'iwc', and/or 'itd'. Any number of moments can be given in a comma-separated string. ['integ']

TAG = STRING (Given)
Which moment map to tag as a representative image. ['integ']

Output: The moments map(s) with suffix equal to the given moment(s) by the MOMENTS parameter.
Tasks: Primitives: _COMPONENT_EXISTS_ , _CREATE_MOMENTS_MAPS_THROUGH_SMOOTHING_
Back to top
_CREATE_NOISE_MAP_
Description: Create a map of the noise for a given cube. This primitive is used to create a noise map. It first masks out emission regions using a previously-defined mask (see _CREATE_BASELINE_MASK_), and then collapses the resulting cube along the frequency axis using the RMS estimator.
Arguments: GROUP = INTEGER (Given)
How to process group files. 0 means use the current Frame object. 1 means use the current Group object. 2 means use each Frame member of the current Group object. [0]

QA = LOGICAL (Given)
Whether or not to perform quality assurance calculations on the resulting noise map. [0]

Output: _noise : the noise map
Tasks: KAPPA: ADD, COLLAPSE, PASTE
Back to top
_RETRIEVE_TAG_
Description: Retrieve a tagged Frame. This primitive can be used to retrieve a Frame that has been previously tagged with the _SET_TAG_ primitive or the tagset() Frame method.
Arguments: TAG = STRING (Given)
The tag to retrieve. This argument is mandatory, and an error will be thrown if it is not defined. If the tag has not been previously used, then the current frame will not be changed.

THROW = LOGICAL (Given)
Whether or not to throw an error if the requested tag does not exist. [1]

Back to top
_CREATE_CUBE_GROUP_
Description: Create a cube from a group of time-series ACSIS observations. This primitive takes time-series ACSIS cubes from each observation in the current group and runs MAKECUBE on them to create a spatial/spectral cube.
Arguments: BYTES_PER_PIXEL = INTEGER (Given)
The number of bytes per pixel. [4]

MAXSIZE = INTEGER (Given)
The maximum size, in bytes, of the output cube. This value does not include extra information such as variance or weight arrays, FITS headers, or any other NDF extensions. [512000000]

PARAMS = STRING (Given)
An optional array which consists of additional parameters required by the Sinc, SincSinc, SincCos, SincGauss, Somb, SombCos, and Gauss spreading methods (see parameter SPREAD). See documentation for the PARAMS parameter for MAKECUBE. ['']

SPREAD = STRING (Given)
The interpolation method to use when regridding the cube. This can be any of those allowed by MAKECUBE, listed in the SPREAD parameter. ['nearest']

TILEBORDER = INTEGER (Given)
The size of the border to be added to tiles. This is used when smoothing the cube in spatial extent in later processing, so as to not add edge effects. [0]

Output: A cube (or set of cubes) whose filename is of the form gaYYYYM- MDD_NN_SS_cubeMMM.sdf, where YYYYMMDD is the UT date, NN is the observation number, SS is the zero-padded subsystem number, and MMM is the zero-padded tile number. Tiles are numbered starting from 1 and increasing monotonically, counting from the bottom left corner in spatial extent and proceeding in a raster fashion from left to right.
Tasks: KAPPA: NDFTRACE. SMURF: MAKECUBE
Primitives: _GET_MAKECUBE_PARAMS_
Back to top
_ITERATIVE_GROUP_PRODUCTION_
Description: This primitive creates a group co-added cube from all members of the current group. It then baselines the cube and creates moments maps.

In the process of baselining the group cube, this primitive also creates a baseline mask file, masking out emission. It then runs this mask through UNMAKECUBE to create time-series masks. These masks are applied to the original time-series data, which are then baselined. The baselined time-series data are then run through MAKECUBE to create individual baselined cubes for each observation. Moments maps are then made from these cubes.

Arguments: FREQUENCY_SMOOTH = INTEGER (Given)
The number of channels to smooth in the frequency axis when smoothing to determine baselines. This number should be small (~10) for narrow-line observations and large (~25) for broad-line observations. [25]

MOMENTS = STRING (Given)
The moment maps to create. These are any of the values allowed for the ESTIMATOR parameter to the COLLAPSE method, but in reality this should probably be 'integ', 'iwc', and/or 'itd'. Any number of moments can be given in a comma-separated string. ['integ']

ORDER = INTEGER (Given)
The polynomial order that will be used when estimating baselines. [5]

PARAMS = STRING (Given)
The parameters to pass to MAKECUBE when using the Sinc, SincSinc, SincCos, SincGauss, Somb, SombCos, and Gauss spreading methods (see SPREAD parameter). ['']

SPATIAL_SMOOTH = INTEGER (Given)
The number of pixels to smooth in both spatial axes when smoothing to determine baselines. [3]

SPREAD = STRING (Given)
The method to use when spreading each input pixel value out between a group of neighbouring output pixels when using MAKECUBE to generate a cube. ['nearest']

Tasks: Primitives: _CREATE_CUBE_GROUP_, _REMOVE_BASELINE_THROUGH_SMOOTHING_, _CREATE_MOMENTS_MAPS_THROUGH_SMOOTHING_, _RECREATE_MASKED_TIMESERIES_, _REMOVE_BASELINE_MASKED_TIMESERIES_, _CREATE_CUBE_FRAME_FROM_GROUP_
Back to top
_REMOVE_BASELINE_THROUGH_SMOOTHING_
Description: This primitive generates a baseline mask from a smoothed version of the spectrum which it uses to provide a better baseline fit. The mask generated by _CREATE_BASELINE_MASK_ is used to mask out the non-baseline regions from the original input cube using ADD. Baselines are then fitted to this masked cube with MFITTREND (METHOD=single) using the full range with auto=false.
Arguments: ORDER = INTEGER (Given)
The polynomial order that will be used when estimating baselines. [5]
Tasks: KAPPA: ADD, MFITTREND, NDFTRACE, SUB
Primitives: _CREATE_BASELINE_MASK_
Back to top
_CREATE_BASELINE_MASK_
Description: Uses frequency and spatial smoothing to find the line-free regions of the cube (ESTIMATOR=mean). It then uses mfittrend (METHOD=single, auto) to generate a baseline mask.
Arguments: FREQUENCY_SMOOTH = INTEGER (Given)
The number of channels to smooth in the frequency axis when smoothing to determine baselines. This number should be small (~10) for narrow-line observations and large (~25) for broad-line observations. [25]

SPATIAL_SMOOTH = INTEGER (Given)
The number of pixels to smooth in both spatial axes when smoothing to determine baselines. [3]

ORDER = INTEGER (Given)
The polynomial order that will be used when estimating baselines. [5]

GROUP = INTEGER (Given)
How to process group files. 0 means use the current Frame object. 1 means use the current Group object. 2 means use each Frame member of the current Group object. [0]

Tasks: KAPPA: BLOCK, MFITTREND
Back to top
_CREATE_MOMENTS_MAPS_THROUGH_SMOOTHING_
Description: This primitive is used to create moments maps. It first smooths the cube along the frequency axis, then in the spatial axes. It then masks out emission regions using a previously-determined mask (see _CREATE_BASELINE_MASK_), and then calculates the RMS in the emission-free regions. This RMS is used to set a threshold for clump-finding. The clumps are then turned into an emission mask (masking out non-clumps), and the masked cube is then collapsed to form the moment map.
Arguments: FREQUENCY_SMOOTH = INTEGER (Given)
The number of channels to smooth in the frequency axis when smoothing to determine baselines. This number should be small (~10) for narrow-line observations and large (~25) for broad-line observations. [25]

GROUP = INTEGER (Given)
How to process group files. 0 means use the current Frame object. 1 means use the current Group object. 2 means use each Frame member of the current Group object. [0]

MOMENTS = STRING (Given)
The moment maps to create. These are any of the values allowed for the ESTIMATOR parameter to the COLLAPSE method, but in reality this should probably be 'integ', 'iwc', and/or 'itd'. Any number of moments can be given in a comma-separated string. ['integ']

ORDER = INTEGER (Given)
The polynomial order that will be used when estimating baselines. [5]

RMS_THRESHOLD = REAL (Given)
The RMS threshold above which emission will be considered to be a clump. [4.5]

SPATIAL_SMOOTH = INTEGER (Given)
The number of pixels to smooth in both spatial axes when smoothing to determine baselines. [3]

TAG = STRING (Given)
Which moment map to tag as a representative image. ['integ']

Output: The moments map(s) with suffix equal to the given moment(s) by the MOMENTS parameter.
Tasks: CUPID: FINDCLUMPS
KAPPA: ADD, BLOCK, COLLAPSE, DIV, MULT, NDFCOPY, NDFTRACE, NOMAGIC, PASTE, PLUCK, SETBB, SETVAR, STATS
Primitives: _CREATE_BASELINE_MASK_
Back to top
_QA_MAP_RMS_FREQ_UNIFORMITY_
Description: This primitive tests line-free regions of reduced cubes for average RMS noise. It compares the RMS in the upper and lower 10% of the frequency bounds, after masking out lines, and if the RMS values differ by more than a given percentage (which varies from survey to survey), then the test is considered to fail.
A line mask is obtained from the BASELINE_MASKS internal user header. If no such masks are available, then new masks are created using the _CREATE_BASELINE_MASK_ primitive.
Arguments: FREQUENCY_SMOOTH = INTEGER (Given)
If a baseline mask has not already been found, then smooth in frequency space by the given number of pixels. [25]

SPATIAL_SMOOTH = INTEGER (Given)
The number of pixels to smooth in both spatial axes when smoothing to determine baselines. [3]

ORDER = INTEGER (Given)
The polynomial order that will be used when estimating baselines. Only used if baselining has not been done. [5]

GROUP = INTEGER (Given)
How to process group files. 0 means use the current Frame object. 1 means use the current Group object. 2 means use each Frame member of the current Group object. [0]

Notes: The survey name is obtained from the SURVEY FITS header. If this header is blank, then the special pseudo-survey "Telescope" is used.
Output: RMS maps for the lower and upper bounds in cubes with suffix _rmslo and _rmshi.
Tasks: KAPPA: ADD, COLLAPSE, NDFCOPY, STATS
Back to top
_RECREATE_MASKED_TIMESERIES_
Description: This primitive recreates time-series data with emission masked. It does so by retrieving a baseline mask as created in the _REMOVE_BASELINE_THROUGH_SMOOTHING_ primitive, running it through UNMAKECUBE to create time-series masks, and applying those to the raw time-series data.
Arguments: INTERP = STRING (Given)
The method to use when resampling the input sky cube pixel values. ['nearest']

PARAMS = STRING (Given)
An array which consists of additional parameters required by the Sinc,SincSinc, SincCos, SincGauss, Somb, and SombCos interpolation schemes (see INTERP argument). ['']

Tasks: Primitives: _CREATE_TIMESERIES_MASK_, _MASK_TIMESERIES_DATA_
Back to top
_REMOVE_BASELINE_MASKED_TIMESERIES_
Description: This primitive determines a baseline for a time-series cube using previously-masked time-series data, determined by the _RECREATE_MASKED_TIMESERIES_ primitive. A high-order polynomial is fit to the masked data to determine the baseline, which is then subtracted from the original (unmasked) time-series data.
Arguments: ORDER = INTEGER (Given)
The polynomial order that will be used to determine the baseline. As the masked data will be used, a high order is recommended. [5]
Notes: The masked time-series data filenames must be stored in a hash reference in the Group MASKED_TIMESERIES uhdr, with the key being the original unmasked time-series data, and the value being the masked time-series data.
Tasks: KAPPA: MFITTREND, SUB
Back to top
_CREATE_CUBE_FRAME_FROM_GROUP_
Description: Create a cube frame from group ACSIS observations and insert it in the Frm object
Arguments: ORDER = INTEGER (Given)
The polynomial order that will be used to determine the baseline. As the masked data will be used, a high order is recommended. [5]
Notes: Assumes this has been called after the baseline has been subtracted from the raw time series following masking from the group. The primitive does not enforce this and will tag the resulting cube as a reduced product regardless.
Tasks: Primitives: _CREATE_CUBE_FRAME_, _TAG_AS_REDUCED_PRODUCT_
Back to top
Contact: Per Friberg. Updated: Wed Feb 11 16:01:22 HST 2009

Return to top ^