API

Modules

    Types and constants

    Functions and macros

    Documentation

    LegendDataTypes.TableLike — Type
    TableLike = AbstractVector{<:NamedTuple}

    The type must also support the Tables.jl interface.

    Examples are TypedTables.Table and StructArrays.StructArray

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

    Get object at key from input.

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

    Get object at key from input.

    source
    LegendDataTypes.chname2int — Method
    chname2int(channel_string::AbstractString)::Integer

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

    source
    LegendDataTypes.fast_flatten — Function
    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_energy — Method
    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_key — Method
    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_channels — Method
    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_daqenergy — Method
    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_data — Method
    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.getunits — Function
    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.int2chname — Method
    int2chname(channel_number::Integer)::AbstractString

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

    source
    LegendDataTypes.map_chunked — Method
    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_properties — Function
    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.readdata — Function
    readdata(input, name::AbstractString)
    readdata(input, name::AbstractString, SomeDataType::Type)

    Read the value stored under name from input.

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

    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_table — Function
    LegendDataTypes.similar_table(orig_tbl::AbstractVector{<:NamedTuple{names}}, cols::NamedTuple{names})

    Return a table similar to orig_tbl from columns cols.

    source
    LegendDataTypes.to_properties — Function
    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
    LegendDataTypes.writedata — Function
    writedata(output, name::AbstractString, x)

    Write a value x under name to output.

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

    source