CHANGE_QUALITY

Set SCUBA data quality bad or good

Description:

This application is used to set SCUBA data quality bad or good by using SCUBA sections to specify a subset of the full data.

Once the data specification has been decoded the application will read from parameter BAD_QUALITY whether quality should be set good or bad. A ‘yes’ answer will mark the area bad, a ‘no’ answer will mark the area good (an area will only be good if no other QUALITY bits are set - change_quality only uses QUALITY bit 3). The section can be inverted by using the negation character at the end of the section.

Usage:

change_quality ndf{spec1}{specn} bad_quality

Parameters:

BAD_QUALITY = LOGICAL (Read)
Set quality to BAD. Answering this question with a ‘yes will mean that the selected data will be set to BAD. ‘no will set them to good.
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.
SECTION() = CHAR (Read)
This array 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.

Examples:

change_quality ndf{} BAD_QUALITY=false
Select the entire array and unset bit 3.
change_quality ndf{b2} BAD_QUALITY
Select the second bolometer and mark it bad.
change_quality ndf{b2;i3}- BAD_QUALITY
Select the third integration of bolometer two but set all other data points bad by inverting the section.
change_quality ndf{b16}{i2} BAD_QUALITY
Select all of bolometer 16 and the whole of integration 2.
change_quality ndf{e5,16:18} MSG_FILTER=quiet
Select exposure 5 and 16 through 18. Messaging is turned off.
change_quality ndf
Since no section has been specified, the user will be prompted for a section later.
change_quality test SECTION=["{b41,52}",{i3}] BAD_QUALITY
Set bolometers 41 and 52 as well as integration 3 to bad quality. Use of SECTION here is not recommended given the complication when using commas and square brackets.
change_quality test SECTION=[{b2;i2}-] BAD_QUALITY
Set everything bad except bolometer 2 and integration 2.

Notes:

Samples are marked bad by setting bit 3 of the quality array. The effects of change_quality can be removed by changing the value of the bad bit mask (with the Kappa task setbb or by running change_quality on the entire array [section is {} for entire array] but with BAD_QUALITY=false) so that bit 3 (decimal value of 8) is no longer used as a masking bit.

Related Application

SURF: change_data, rebin, scuphot;
KAPPA: setbb