Skip to content

XR selection routines #75

@phockett

Description

@phockett

Some selection routines broken in XR 2022.3.0 (and presumably more recent versions...?).

Issue seems to be with slicing on float indexes, produces key or type errors, but used to work.

For example, slicing ADMs by t-index:

   # And for the ADMs...
    # SLICE version - was working, but not working July 2022, not sure if it's data types or Xarray version issue? Just get KeyErrors on slice.
    # data.selOpts['ADM'] = {}   #{'thres': 0.01, 'inds': {'Type':'L', 'Eke':1.1}}
    # data.setSubset(dataKey = 'ADM', dataType = 'ADM', sliceParams = {'t':[38, 44, 4]}) 

    #********** HACKS/DEBUG
    # Inds/mask version - seems more robust?
    # trange=[38, 44]  # Set range in ps for calc
    # tStep=4  # Set tStep for downsampling
    # tMask = (data.data['ADM']['ADM'].t>trange[0]) & (data.data['ADM']['ADM'].t<trange[1])
    # data.data[data.subKey]['ADM'] = data.data['ADM']['ADM'][:,tMask][:,::tStep]  # Set and update
    # print(f"ADMs: Selecting {data.data['subset']['ADM'].t.size} points from {data.data['ADM']['ADM'].t.size}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions