XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


ssclib (ssclib-4.36.1) [xmmsas_20230412_1735-21.0.0]


allFiltersPassValue

This returns true EITHER if the specified component contains no filter on the specified axis OR all of the filters of this component and on this axis pass the specified value.

NOTE: In the original version, it calls dssFilterName(filter), which may cause Segmenation Fault at the time of writing (Apr 2011). Therefore it is rewritten with dssHasFilter(). The algorithm is not completely identical, however, in the practical cases it should not cause any trouble, especially if the FITS files do not contain multiple DSS in the same dssComp with the same axis name and filterName (which should not be the case in any FITS file). Note that the original and revised algorithms are switched via a parameter isUsed_dssFilterName.

The revised algorithm is as follows:

  1. Prepare the array AryIdFilterT=(/ RANGEFILTERT, REGIONFILTERT, ... /). Then, the loop over $i=(1..7)$:
  2. Check whether a filter with the given axisName for AryIdFilterT(i) exists.
  3. If so, check the consistency with the given axisValue in the filter.
  4. Those results are stored in filterOnThisAxisExists(i) and valueIsPassed(i). For example, if $i==2$, then that is for filterType==REGIONFILTERT (for the given dssComp and axisName).
  5. Finally returns true/false, as described at the top of this comments here.

  logical(bool) function allFiltersPassValue(dssComp, axisName, axisValue, filterType)
    type(DScompT),   intent(in) :: dssComp
    character(*), intent(in) :: axisName
    real(single), intent(in) :: axisValue
    integer, intent(in), optional :: filterType
  end function allFiltersPassValue

XMM-Newton SOC -- 2023-04-16