# irfpy.ica.data_class¶

Description:

A wrapper class handling RPC-ICA level 1 data. Centralises various attributes from the initial matlab files under a single class, as well as new attributes for a broader use (see below). The class includes methods for various purposes, and aims to ease the filtering of different modes, software versions and post-acceleration values. Filtering is however optional. The object will contain all data available for one day. It is not meant to span over several days (because of the size of the arrays) and do not allow a shorter selection.

To create one object:

date = '20141128'
ICADataSet = ICAData(date, dataPath='/<bli>/<bla>/')        ## (Absolute) path to the data directory, e.g. containing /level1.


A more detailed example is given in pltSpec.py

Arguments:

day Day of interest. dataPath (default rcDataPath) Where data can be found. Should lead to the top level of the data tree - ex ‘/…/processed’ - optional - string modeSel (default ‘mostPresent’) Desired mode(s) - optional - float swSel (default ‘accordingToMode’) Desired software version(s) - optional - float paccSel (default ‘all’) Desired pacc value(s) - optional - float cleanCT (default True) If cross-talk cleaning wanted - optional - boolean

Dependencies:

class irfpy.ica.data_class.ICAData(day, dataPath=None, modeSel='mostPresent', swSel='accordingToMode', paccSel='all', cleanCT=True)[source]

Bases: object

day [necessary] = ‘yyyymmdd’ ; dataPath [optionnal but…] = ‘/<bli>/<bla>/ICAPy/’ ; the absolute/relative path to the ICAPy directory.

elevTableNew

Since the given elevation table is not necessarely “alligned” (elevation/energy dependency), one cannot simply use the indices along elevation dimension and calculate a physical elevation from it (as done with azimuth anodes, because anodes are always at the same physical angle, no matter the energy!) So we define a new “artificial” elevation table, and will sort all (elevation, energy) combination according to this new table, ICAData.elevTableNew . This is in fact a re-binning.

filterData(modeSel='mostPresent', swSel='accordingToMode', paccSel='all')[source]
cleanCT()[source]

Removing electronic cross-talk between sectors, empirical approach. With E the counts in the emitter sector, R the counts in the receiver sector:

R -= (a*ln(E)+b) * E

alignElev()[source]

Produces a new ionSPectraScan array with aligned elevation bins: for a same elevation index, all energies correspond to one physical elevation, and this new elevation table is given in ICAData.elevTableNew

initFOVEM(species=['H+'])[source]

WARNING: initFOVEM integrate 16 time instances to create 1 FOV for each species. SO using ICAData.initFOVEM without considering the different modes operated for the data set considered is not appropriate. ICAData.FOVSpecies can be initialized with any data set since any binned or absent azimuth/elevation is expanded again in the process. Modes 8, 16, 24 correspond to the highest angular resolution (16x16). Modes 9, 17, 25 have binned elevation (from 16 down to 8), and maximum azimuth resolution (16). See Nilsson et al., 2007, ssr, p.682-683

WARNING: initFOVEMScan integrate 16 time instances to create 1 FOV for each species. SO using ICAData.initFOVEMScan without considering the different modes operated for the data set considered is not appropriate. ICAData.FOVSpecies can be initialized with any data set since any binned or absent azimuth/elevation is expanded again in the process. Modes 8, 16, 24 correspond to the highest angular resolution (16x16). Modes 9, 17, 25 have binned elevation (from 16 down to 8), and maximum azimuth resolution (16). See Nilsson et al., 2007, ssr, p.682-683

initSpecSpecies(species=['H+'])[source]

Initialise a 5D matrix for the specified species, with elevation aligned.

initSpectraSpecies(species, msp=None)[source]

Returns an array of same shape as ICAData.ionSpectraScan. The counts outside the manual selection for the specified species are put to 0.

indToAz(ind)[source]

az=0 inbetween sectors 8 and 9, along +Xica = +Xsc.

indToEl(ind)[source]

From an elevation index (as binned previously) [0,nbElev] to [-elevLim,elevLim]

azToInd(azim)[source]

azim physical angle in RADIAN, in [0 , 2*pi]

elToInd(elev)[source]

elev physical angle in RADIAN, in [-pi/4 , pi/4]

indToVec(secInd, elevInd)[source]

From (secInd,elevInd) to a unit VIEWING DIRECTION vector in ICA reference frame

indToVecRaw(secInd, elevInd)[source]

From (secInd,elevInd) to a unit VIEWING DIRECTION vector in ICA reference frame, for unaligned elevation.

azElToVec(azim, elev)[source]

From (azim,elev) in RADIAN to a unit VIEWING DIRECTION vector in ICA reference frame.