goldpan.channels

Which physical detector channel is a dump’s (detector, channel) pair?

A dump labels its traces <event>_<detector>_Phonon_<n> and holds 4 channels per detector, so a trace is addressed by two small integers: detector (0, 1, 2) and channel (0 to 3). In Run 76 those are not three detectors but three 4-channel readout boards (DCRC1, DCRC3, DCRC4) of one two-sided detector, and the real channel names are Side1pA … Side1pF, Side2pA … Side2pF. This module turns the two integers into those names:

from goldpan import channels as pch

pch.channel_name(0, 0)      # 'Side2pC'
pch.channel_label(0, 0)     # 'Side2pC (DCRC1 pA, HV2 pA)'
pch.channel_info(0, 0)      # Channel(detector=0, channel=0, name='Side2pC', ...)
pch.find_channel('Side2pC') # (0, 0)
pch.all_channels()          # the 12 Channel records, in (detector, channel) order
pch.sensor_channels()       # the 6 that are QET channels of the detector

Which table to use. The Setup table of the Run 76 summary (https://villano-lab.github.io/R76Analysis/cdms/k100/run_summary/run_76.html; Matt Fritts’s explanation of it is on page 28 of notebook N-MISC-23-001) gives, for every sensor Label, the HV connector pin it is wired to in Side-1 readout and in Side-2 readout. HV1 and HV2 are the two D-sub connectors the DCRCs plug into (HV1 is DCRC3, HV2 is DCRC1; the 2022 run diaries’ header says “HV 1(L)/2(R) -> DCRC50(3)/DCRC55(1), … NaI trigger signal -> DCRCX(4)”), and pin pA … pD of a connector is input pA … pD of its DCRC. The table’s DCRC (2-sided) column is for the two-sided readout and is not used. The run was in Side-2 readout from late in the Run 76 diaries, so the December 2022 series (07221203_2025) is Side-2 readout, the default here (readout=2). In Side-2 readout only the pins A, B and D carry sensors (pC is for Side-1 readout) and DCRC4 pA carries the trigger signal of the NaI array, so six channels are sensors, one is the NaI trigger input and five are not connected. (For DCRC1 the table’s A/B order is the one used; the explanatory text next to the table has A and B the other way round, which is taken to be a typo.)

Only this module knows the table; everything else in python/ works on plain arrays and indices.

The mapping is under development: that the dump’s detectors 0, 1, 2 are DCRC1, DCRC3, DCRC4 (ascending board number) is inferred, and that channels 0 to 3 are the board inputs pA to pD in order is assumed. If they turn out wrong, change DCRC_OF_DETECTOR or the order of the rows in PINS and nothing else.

History. Until 2026-10-22 this module used the table’s DCRC (2-sided) column and named twelve sensors on both sides, which was wrong for Side-2 readout (six of its “Side 1” channels do not exist in the readout of this series).

Module Attributes

SENSOR

Roles of a channel.

NAI_TRIGGER

Roles of a channel.

NOT_CONNECTED

Roles of a channel.

Functions

all_channels([readout])

channel_info(detector, channel[, readout])

channel_label(detector, channel[, readout])

channel_name(detector, channel[, readout])

find_channel(name[, readout])

sensor_channels([readout])

Classes

Channel(detector, channel, name, role, side, ...)

One channel of the readout: where it is in the dump and what it is on the detector.

goldpan.channels.SENSOR = 'sensor'

Roles of a channel.

goldpan.channels.NAI_TRIGGER = 'nai_trigger'

Roles of a channel.

goldpan.channels.NOT_CONNECTED = 'not_connected'

Roles of a channel.

class goldpan.channels.Channel(detector, channel, name, role, side, letter, dcrc, board_input, hv_output)[source]

Bases: NamedTuple

One channel of the readout: where it is in the dump and what it is on the detector.

Parameters:
  • detector (int)

  • channel (int)

  • name (str)

  • role (str)

  • side (int | None)

  • letter (str | None)

  • dcrc (str)

  • board_input (str)

  • hv_output (str | None)

detector: int

Alias for field number 0

channel: int

Alias for field number 1

name: str

Alias for field number 2

role: str

Alias for field number 3

side: int | None

Alias for field number 4

letter: str | None

Alias for field number 5

dcrc: str

Alias for field number 6

board_input: str

Alias for field number 7

hv_output: str | None

Alias for field number 8

goldpan.channels.channel_info(detector, channel, readout=2)[source]

Warning

Under development: the dump’s detector index -> DCRC board order (0,1,2 = DCRC1,DCRC3,DCRC4) is inferred, and channels 0 to 3 = board inputs pA to pD is assumed; not yet confirmed against the run’s ODB

The Channel record for a dump (detector, channel) pair (readout 2 = Side-2 readout, the default).

Parameters:
Return type:

Channel

goldpan.channels.channel_name(detector, channel, readout=2)[source]

Warning

Under development: the dump’s detector index -> DCRC board order (0,1,2 = DCRC1,DCRC3,DCRC4) is inferred, and channels 0 to 3 = board inputs pA to pD is assumed; not yet confirmed against the run’s ODB

Channel name, e.g. channel_name(0, 0) == 'Side2pC'; 'NaI' for the NaI trigger input.

Parameters:
Return type:

str

goldpan.channels.channel_label(detector, channel, readout=2)[source]

Warning

Under development: the dump’s detector index -> DCRC board order (0,1,2 = DCRC1,DCRC3,DCRC4) is inferred, and channels 0 to 3 = board inputs pA to pD is assumed; not yet confirmed against the run’s ODB

Name with the board input and the HV pin, for plot labels: 'Side2pC (DCRC1 pA, HV2 pA)'.

Parameters:
Return type:

str

goldpan.channels.find_channel(name, readout=2)[source]

Warning

Under development: the dump’s detector index -> DCRC board order (0,1,2 = DCRC1,DCRC3,DCRC4) is inferred, and channels 0 to 3 = board inputs pA to pD is assumed; not yet confirmed against the run’s ODB

The dump (detector, channel) of a channel name, e.g. find_channel('Side2pC') == (0, 0).

Parameters:
Return type:

tuple

goldpan.channels.all_channels(readout=2)[source]

Warning

Under development: the dump’s detector index -> DCRC board order (0,1,2 = DCRC1,DCRC3,DCRC4) is inferred, and channels 0 to 3 = board inputs pA to pD is assumed; not yet confirmed against the run’s ODB

All 12 Channel records (sensors, the NaI input and the free inputs), in (detector, channel) order.

Parameters:

readout (int)

Return type:

list

goldpan.channels.sensor_channels(readout=2)[source]

Warning

Under development: the dump’s detector index -> DCRC board order (0,1,2 = DCRC1,DCRC3,DCRC4) is inferred, and channels 0 to 3 = board inputs pA to pD is assumed; not yet confirmed against the run’s ODB

The Channel records of the sensors (6 in Side-2 readout), in (detector, channel) order.

Parameters:

readout (int)

Return type:

list