CHANGE_DATA

Set SCUBA data to any value

Description:

This application is used to set SCUBA data to any value by using SCUBA sections to specify a subset of the full data. Data, Variance and Quality arrays can be modified.

Once the data specification has been decoded the application will read from parameter VALUE the value of the data that should be used. All data specified by the section (or by the inverse of this section if specified) will be set to this value.

Usage:

change_data ndf{spec1}{spec2}{specn} value out

Parameters:

COMP = LITERAL (Read)
The name of the NDF array component which should be changed: "Data","Error", "Quality" or "Variance" (where "Error" is the alternative to "Variance" and causes the square root of the variance values to be taken). The default component is always DATA. If "Quality" is specified, then the quality values are treated as numerical values (in the range 0 to 255).
IN = CHAR (Read)
Name of data set and the specification of the data to be changed. Usually of the form ‘ndf{spec1}{spec2} where ndf is the filename and spec1...n are the section specifications. The section can be read from the SECTION parameter if the SCUBA section is omitted.
MSG_FILTER = CHAR (Read)
Message filter level. Allowed values are QUIET, NORM and VERB. Default is NORM. There are no verbose messages
OUT = NDF (Write)
Name of the NDF that stores the modified data.
SECTION() = CHAR (Read)
This parameter can be used to specify SCUBA sections. Curly brackets must still be given. Since this is an array parameter square brackets must be used to specify more than one component:

SECTION > [ {b3} , {i2} ]

would supply two SECTIONS of {b3} and {i2}. Only {b3} will be used if the square brackets are not used. Care must also be taken when using commas in SCUBA sections - the parameter system will split multiple entries on commas unless the entire section is quoted:

SECTION > [ "{b3,5}" , {i2} ]

If necessary the negation character should come after a section (ie after the closing curly bracket) and that negation applies to the combined section and not just the string containing the negation character:

SECTION > [ {b3}-, {i2} ]

implies that the section consists of everything except bolometer 3 and integration 2.

This parameter is only used when no SCUBA section was specified via the IN parameter.

VALUE = LITERAL (Read)
Value to which all selected data points should be set. A value of ‘bad will set the data point to VAL__BAD (Starlink bad data value). For COMP=Quality only numbers 0 to 255 are allowed - numbers outside this range are assumed to be bad values.

Examples:

change_data ndf{b2} bad changed
Copy all data in ndf.sdf to changed.sdf and change all data in bolometer 2 to bad.
change_data ndf{} comp=variance value=0.0001
Copy ndf.sdf to the output file (asked for explicitly) and set all variance values to 0.0001.
change_data test section=[{b47},{i3}] value=1.02
Select data from bolometer 47 and integration 3 in test.sdf and set this to a value of 1.02. This method of selecting a section is not recommended given the complication using commas and square brackets.
change_data test2 section=["{b2,5}", {i2}-] value=0.2 comp=err
Select everything except integration 2 and bolometers 2 and 5. Set the error for this section to 0.2
change_data phot{i2:6}{b3} comp=quality value=8
Explicitly set the quality array to 8 for integrations 2 through 6 and bolometer 3. The task change_quality is recommended in this case since then only bit 3 is affected.
change_data map{i2,5}- value=0.0
Set everything except integrations 2 and 5 to zero.

Notes:

Related Application

SURF: change_quality, rebin, scuphot