Opened 6 years ago

Closed 2 years ago

#600 closed task (fixed)

Open loop resampling adjustments [1 h]

Reported by: Ian Culverwell Owned by: Ian Culverwell
Priority: normal Milestone: ROPP9.1 carry over
Component: ropp_pp Version: 11.0
Keywords: Cc:

Description

Change history (2)

comment:1 by Ian Culverwell, 3 years ago

Version: 9.011.0

There are two aspects to this ticket. The first concerns raw sampling signals with fewer than 600 elements, and in these cases it calculates the minimum dt over a range of n_rs/2 < 300 samples, thus:

    dn = MIN(nt, n_rs/2)
    ALLOCATE(ts_array(n_rs-dn))
    ts_array = ABS(rs_data%dtime(1+dn:n_rs)-rs_data%dtime(1:n_rs-dn))/dn
    ts = MINVAL(ts_array)

The second concerns the possibility that we are really dealing with 50 Hz (i.e. open loop) data, rather than 1000 Hz (i.e. raw sampling) data. The code believes it is working with OL data if the minimum dt is 5% larger than 0.001 sec, and then recalculates the minimum dt from the time-separations of the 50 Hz data. Note that the chosen algorithm,

    IF (ts > 0.00105_wp) THEN ! this is likely open loop data (50 Hz)
      ts = MINVAL(ts_array, MASK=(ABS(ts_array - 0.02_wp) < 0.001_wp))
    END IF

could cause the code to deliver junk (e.g. 1.7E308) if the MASK condition is never met, i.e. if the lower freq data is never particularly close to 50 Hz. This should probably be fixed with something like

    IF (ts > 0.00105_wp .AND. COUNT(ABS(ts_array - 0.02_wp) < 0.001_wp) > 0) THEN ! this is likely open loop data (50 Hz)
      ts = MINVAL(ts_array, MASK=(ABS(ts_array - 0.02_wp) < 0.001_wp))
    END IF

or perhaps some more involved consideration of MINVAL(ts_array) and MAXVAL(ts_array).

It doesn't cause a problem in our rs-to-ropp tool test dataset because this has

 nt =          300
 n_rs =         3000
 ts =    1.0000238226105769E-003

Checks out OK, so commit change at r6837.

Spell out in the ROPP PP user guide that ropp_pp_grasrs2ropp can merge OL+CL data as well as RS+OL data in r6838.

Leaving ticket open as Stig should probably comment on it.

comment:2 by Ian Culverwell, 2 years ago

Resolution: fixed
Status: newclosed

Stig's comment: Wonder why we don't just set ts = 0.02 or ts = 0.001 based on the (ts > 0.00105) check. That would need some testing.

Happy to kick that into the long grass, and close the ticket for ROPP-11.0.

Note: See TracTickets for help on using tickets.