API

Modules

    Types and constants

    Functions and macros

    Documentation

    LegendDataTypes.TableLikeType
    TableLike = AbstractVector{<:NamedTuple}

    The type must also support the Tables.jl interface.

    Examples are TypedTables.Table and StructArrays.StructArray

    source
    Base.getindexMethod
    getindex(input::AbstractLegendInput, key::AbstractString)
    getindex(input::AbstractLegendInput, key::AbstractString, idxs::AbstractVector)

    Get object at key from input.

    source
    Base.getindexMethod
    setindex!(output::AbstractLegendOutput, key::AbstractString)
    getindex(output::AbstractLegendOutput, key::AbstractString, idxs::AbstractVector)

    Get object at key from input.

    source
    LegendDataTypes.chname2intMethod
    chname2int(channel_string::AbstractString)::Integer

    Convert a channel name string, as used in LEGEND data files to an integer channel number.

    source
    LegendDataTypes.fast_flattenFunction
    fast_flatten(vector_of_arrays)

    Flattens a vector of arrays into a single array, by concatenating the inner arrays along the last dimension.

    source
    LegendDataTypes.filter_raw_data_by_energyMethod
    filter_raw_data_by_energy(
        raw_data::TableLike,
        calib_func::Function,
        energy_windows::AbstractDict{Symbol,<:AbstractInterval{<:Number}}
    )::IDDict{Symbol,<:Any}

    Filter the table raw data, selecing only events in the energy intervals in values(energy_windows).

    The selection is based on DAQ energy reconstruction and the energy calibration function calib_func.

    Returns a dicts of raw data tables with the same keys as energy_windows.

    source
    LegendDataTypes.flatten_by_keyMethod
    flatten_by_key(data::AbstractVector{<:IdDict{<:Any, <:AbstractVector}})::IdDict

    Flattens a vector of IdDicts into a single IdDict, by concatenating the entries for each key separately.

    source
    LegendDataTypes.get_all_channelsMethod
    get_all_channels(ds::AbstractDict{<:AbstractString,<:Any})::AbstractVector{<:Integer}

    Get the channel numbers for all channels in datastore.

    Channels are identified as keys starting with "ch...", according to LEGEND convention. datastore will typically be on-disk, e.g. a LegendHDF5IO.LegendHDFLHDataStore.

    Channel named are mapped to integer channel numbers via chname2int.

    source
    LegendDataTypes.get_daqenergyMethod
    get_daqenergy(datastore::AbstractDict{<:AbstractString,<:Any}, ch::Integer)::AbstractVector{<:Integer}

    Get the daq energy reconstruction contained in the raw data of channel ch in datastore.

    datastore will typically be on-disk, e.g. a LegendHDF5IO.LegendHDFLHDataStore. Channel numbers are mapped to channel names via int2chname.

    source
    LegendDataTypes.get_raw_ch_dataMethod
    get_raw_ch_data(ds::AbstractDict{<:AbstractString,<:Any}, ch::Integer)::TableLike

    Get the raw data table for channel ch in datastore.

    datastore will typically be on-disk, e.g. a LegendHDF5IO.LegendHDFLHDataStore. Channel numbers are mapped to channel names via int2chname.

    source
    LegendDataTypes.getunitsFunction
    getunits(x)

    Get the units of x, falls back to Unitful.unit(x) if no specialized method is defined for the type of x.

    LEGEND I/O packages shoud add methods for the I/O-object types they handle.

    source
    LegendDataTypes.int2chnameMethod
    int2chname(channel_number::Integer)::AbstractString

    Convert an integer channel number to a channel name string as used in LEGEND data files.

    source
    LegendDataTypes.map_chunkedMethod
    map_chunked(f, table, chunk_size::Integer)

    Maps a function f over a table in chunks of size chunk_size.

    Calls getindex with contiguous index ranges, and so is also efficient for disk-based arrays and similar arrays with slow serial indexing but fast block-wise indexing.

    source
    LegendDataTypes.read_from_propertiesFunction
    read_from_properties(read_property::Function, src::Any, ::Type{T}) where {T<:AbstractArrayCodec}

    Create a array codec of type T from properties of src, using the src-specific function read_property(src, name::Symbol, default_value) to read each property required.

    Returns an value of type T.

    source
    LegendDataTypes.setunits!Function
    setunits!(x)

    Set the units of x.

    LEGEND I/O packages will need to add methods for the I/O-object types they handle.

    source
    LegendDataTypes.similar_tableFunction
    LegendDataTypes.similar_table(orig_tbl::AbstractVector{<:NamedTuple{names}}, cols::NamedTuple{names})

    Return a table similar to orig_tbl from columns cols.

    source
    LegendDataTypes.to_propertiesFunction
    write_to_properties!(write_property!::Function, dest::Any, codec::AbstractArrayCodec)

    Write all information required to re-create codec to dest using thes dest-specific function write_property!(dest, name::Symbol, x).

    Typically returns nothing.

    source