This page was created by the IDL library routine `mk_html_help2`.

Last modified: Fri Sep 26 18:17:39 2025.

# Directory Listing of Routines

# projects/SPP/sweap/SPC/L3i/misc

- PSP_COMMON_SPC_FLAGINFO
- PSP_FILTER_SWP
- SIMPLE_GAPS

# Routine Descriptions

## PSP_COMMON_SPC_FLAGINFO

[Next Routine] [List of Routines]

    NAME: PSP_COMMON_SPC_INFO

    DESCRIPTION:
      Common variables used in PSP/SWEAP/SPC routines

    CREATED BY: Ayris Narock (ADNET/GSFC) 2020

     $LastChangedBy: anarock $
     $LastChangedDate: 2020-10-27 12:50:05 -0700 (Tue, 27 Oct 2020) $
     $LastChangedRevision: 29302 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/SPP/sweap/SPC/L3i/misc/psp_common_spc_flaginfo.pro $

(See projects/SPP/sweap/SPC/L3i/misc/psp_common_spc_flaginfo.pro)

## PSP_FILTER_SWP

[Previous Routine] [Next Routine] [List of Routines]

    NAME: PSP_FILTER_SWP

    DESCRIPTION:
     Removed flagged values from PSP SWEAP SPC tplot variables based on selected
     quality flags.  See usage notes and available flag definitions by calling
     with the /HELP keyword.

     For each TVAR passed in a new tplot variable is created with the filtered
     data.  The new name is of the form:  <tvarname>_{1,2,3}_XXXXXX
     where each 'XX' is a 0 padded flag indicator sorted from lowest to highest.

     So, psp_filter_swp,'np_fit',[3,4] results in tvar named "np_fit_3_0304"
     Or, psp_filter_swp,'np_fit',0,status=2 results in tvar named "np_fit_2_00"

    INPUT:
     TVARS:    (string/strarr) Elements are data handle names
                 OR (int/intarr) tplot variable reference numbers
     DQFLAG:   (int/intarr) Elements indicate which of the data quality flags
                 to filter on. Values from the set of integers 0 - 31

    KEYWORDS:
     HELP:   If set, print a listing of the available data quality flags and
             their meaning.
     STATUS:  (int) From the set {1, 2, 3}. Indicates which flag statuses will be
                 removed.  (default = 3)
                 1: Remove only where the flag is explicitly marked as having
                     bad/problematic/condition present/etc
                 2: Remove (1) AND where status not determined ("don't know")
                 3: Remove all EXCEPT where explictly marked as
                     good/nominal/condition not present/etc for all selected flags

                 TODO: (what to do about the "don't care" encoding status?)

    OUTPUTS:
     NAMES_OUT:  Named variable holding the tplot variable names created
                 from this filter. Order corresponds to the input array of tvar
                 names, so that tvar[i] filtered is in names_out[i]

    EXAMPLE:
      Keep only values explictly marked as good in the general flag
      for the 'psp_spc_np_fit' variable
      IDL> psp_filter_swp,'psp_spc_np_fit',0,status=3

      Remove all values where flags 11 or 12 are explictly marked as bad
      for the 'psp_spc_np_fit' variable
      IDL> psp_filter_swp,'psp_spc_np_fit',[11,12],status=1

    CREATED BY: Ayris Narock (ADNET/GSFC) 2020

     $LastChangedBy: anarock $
     $LastChangedDate: 2021-01-04 11:00:24 -0800 (Mon, 04 Jan 2021) $
     $LastChangedRevision: 29570 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/SPP/sweap/SPC/L3i/misc/psp_filter_swp.pro $

(See projects/SPP/sweap/SPC/L3i/misc/psp_filter_swp.pro)

## SIMPLE_GAPS

[Previous Routine] [List of Routines]

    NAME: SIMPLE_GAPS

    DESCRIPTION:
     Find indices into an array such that when filtered on these
     indices the resulting array has no more than one NaN value
     in a row.  The resulting array will not have a NaN in
     the first or last element of the array, only as an in-between element.

     Used in psp_dyplot to support properly iterating over data gaps when
     plotting confidence intervals in piecewise fashion.

     Expects data to be a 1D array.

    INPUT:
     DATA:   1D array to reference for non finite values

    OUTPUTS:
     KEEP:   Integer array of indices to use to filter the data array.

    EXAMPLE:
       d = [6,4, !values.f_NaN, !values.f_NaN, 3, 1]
       simple_gaps, d, keep_index = keep
       d[keep]
         --> [6,4, NaN, 3, 1]

    CREATED BY: Ayris Narock (ADNET/GSFC) 2020

     $LastChangedBy: anarock $
     $LastChangedDate: 2020-10-27 12:50:05 -0700 (Tue, 27 Oct 2020) $
     $LastChangedRevision: 29302 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/SPP/sweap/SPC/L3i/misc/simple_gaps.pro $

(See projects/SPP/sweap/SPC/L3i/misc/simple_gaps.pro)