Ge

Module for analyzing data from the germanium detectors

class gripspy.science.ge.GeData(detector, telemetry_file=None, save_file=None, max_triggers=None, reject_glitches=False)[source]

Class for analyzing event data from a germanium detector

Parameters:
  • detector (int) – The detector number (0 to 5, usually)
  • telemetry_file (str (or list)) – The name of the telemetry file to analyze. If None is specified, a save file must be specified.
  • save_file (str (or list)) – The name of a save file from a telemetry file that was previously parsed.
  • max_triggers (int) – If not None, cull any events with more than this number of triggers on either detector side.
  • reject_glitches (bool) – If True, cull any events that have any glitch bit set (even on non-triggered channels)

Notes

event_time is stored in 10-ns steps

a

Shorthand for the adc attribute

append(other, defer_processing=False)[source]

Append the information in another GeData instance

c

Shorthand for the cms attribute

d

Shorthand for the delta_time attribute

e

Shorthand for the event_time attribute

g

Shorthand for the glitch attribute

hitmap

The hitmap of single-trigger events

lightcurve(side, binning, time_step_in_seconds=1.0, energy_coeff=None, max_triggers=1)[source]

Return a detector-side-integrated lightcurve, excluding events that exceed a specified maximum number of triggers on that side. Note that max_triggers == 1 is not quite the same as “single-trigger” events because no selection cut is imposed on the the opposite side.

Parameters:
  • side (0 or 1) – 0 for LV side, 1 for HV side
  • binning (array-like) – The binning to use for the underlying data
  • time_step_in_seconds (float) – The size of the time step in seconds
  • energy_coeff (2x512 ndarray) – If not None, apply these linear coefficients (intercept, slope) to convert to energy in keV
  • max_triggers (int) – Exclude events that have more than this number of triggers on the specified side
plot_conversion_vs_time(asiccha, event_mask=None, time_binning=(250, 501, 1), max_triggers=None, **hist2d_kwargs)[source]

Plot the conversions as a function of time since the preceding conversion. This type of plot is useful for looking for post-conversion baseline effects. This plot only makes sense if no events have been culled from the event list upon parsing (e.g., from having too many triggers or having glitches).

Binning of ADC values is currently automatic around the median of the values.

Parameters:
  • asiccha (tuple or int) – Either (ASIC#, channel#) if a tuple or ASIC# * 64 + channel# if an int
  • event_mask (ndarray) – If not None, bool array where True values are which events to plot. Otherwise, the default is those events where asiccha did not trigger.
  • max_triggers (int) – If not None, only show conversions that do not exceed this number of triggers on the same side as asiccha.
  • time_binning (tuple or array-like) – The binning to use for the time since the preceding conversion in microseconds
plot_depth(binning=array([-595, -585, -575, -565, -555, -545, -535, -525, -515, -505, -495, -485, -475, -465, -455, -445, -435, -425, -415, -405, -395, -385, -375, -365, -355, -345, -335, -325, -315, -305, -295, -285, -275, -265, -255, -245, -235, -225, -215, -205, -195, -185, -175, -165, -155, -145, -135, -125, -115, -105, -95, -85, -75, -65, -55, -45, -35, -25, -15, -5, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 405, 415, 425, 435, 445, 455, 465, 475, 485, 495, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595]), **hist_kwargs)[source]

Plot the depth-information plot, for only single-trigger events

Parameters:binning (array-like) – The binning to use for the time-difference axis in nanoseconds
plot_depth_vs_energy(side, depth_binning=array([-595, -585, -575, -565, -555, -545, -535, -525, -515, -505, -495, -485, -475, -465, -455, -445, -435, -425, -415, -405, -395, -385, -375, -365, -355, -345, -335, -325, -315, -305, -295, -285, -275, -265, -255, -245, -235, -225, -215, -205, -195, -185, -175, -165, -155, -145, -135, -125, -115, -105, -95, -85, -75, -65, -55, -45, -35, -25, -15, -5, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 405, 415, 425, 435, 445, 455, 465, 475, 485, 495, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595]), energy_binning=array([-128, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, 512, 520, 528, 536, 544, 552, 560, 568, 576, 584, 592, 600, 608, 616, 624, 632, 640, 648, 656, 664, 672, 680, 688, 696, 704, 712, 720, 728, 736, 744, 752, 760, 768, 776, 784, 792, 800, 808, 816, 824, 832, 840, 848, 856, 864, 872, 880, 888, 896, 904, 912, 920, 928, 936, 944, 952, 960, 968, 976, 984, 992, 1000, 1008, 1016, 1024, 1032, 1040, 1048, 1056, 1064, 1072, 1080, 1088, 1096, 1104, 1112, 1120, 1128, 1136, 1144, 1152, 1160, 1168, 1176, 1184, 1192, 1200, 1208, 1216, 1224, 1232, 1240, 1248, 1256, 1264, 1272, 1280, 1288, 1296, 1304, 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456, 1464, 1472, 1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576, 1584, 1592, 1600, 1608, 1616, 1624, 1632, 1640, 1648, 1656, 1664, 1672, 1680, 1688, 1696, 1704, 1712, 1720, 1728, 1736, 1744, 1752, 1760, 1768, 1776, 1784, 1792, 1800, 1808, 1816, 1824, 1832, 1840, 1848, 1856, 1864, 1872, 1880, 1888, 1896, 1904, 1912, 1920, 1928, 1936, 1944, 1952, 1960, 1968, 1976, 1984, 1992, 2000, 2008, 2016, 2024, 2032, 2040]), energy_coeff=None, min_lv_triggers=1, max_lv_triggers=1, min_hv_triggers=1, max_hv_triggers=1, **hist2d_kwargs)[source]

Plot the depth information versus ‘energy’, integrated over a detector side

Parameters:
  • side (0 or 1) – 0 for LV side, 1 for HV side
  • depth_binning (array-like) – The binning to use for the time-difference axis in nanoseconds
  • energy_binning (array-like) – The binning to use for the ‘energy’ axis in ADC bins or in keV
  • energy_coeff (2x512 ndarray) – If not None, apply these linear coefficients (intercept, slope) to convert to energy in keV
  • min_lv_triggers (int) – Do not include events with fewer than this number of triggers on the LV side
  • max_lv_triggers (int) – Do not include events with more than this number of triggers on the LV side
  • min_hv_triggers (int) – Do not include events with fewer than this number of triggers on the HV side
  • max_hv_triggers (int) – Do not include events with more than this number of triggers on the HV side
plot_hitmap(**imshow_kwargs)[source]

Plot the hitmap of single-trigger events

plot_multiple_trigger_veto(side)[source]

Plot the distribution of multiple-trigger events and veto information

Parameters:side (0 or 1) – 0 for LV side, 1 for HV side
plot_spatial_spectrum(side, binning=array([-128, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, 512, 520, 528, 536, 544, 552, 560, 568, 576, 584, 592, 600, 608, 616, 624, 632, 640, 648, 656, 664, 672, 680, 688, 696, 704, 712, 720, 728, 736, 744, 752, 760, 768, 776, 784, 792, 800, 808, 816, 824, 832, 840, 848, 856, 864, 872, 880, 888, 896, 904, 912, 920, 928, 936, 944, 952, 960, 968, 976, 984, 992, 1000, 1008, 1016, 1024, 1032, 1040, 1048, 1056, 1064, 1072, 1080, 1088, 1096, 1104, 1112, 1120, 1128, 1136, 1144, 1152, 1160, 1168, 1176, 1184, 1192, 1200, 1208, 1216, 1224, 1232, 1240, 1248, 1256, 1264, 1272, 1280, 1288, 1296, 1304, 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456, 1464, 1472, 1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576, 1584, 1592, 1600, 1608, 1616, 1624, 1632, 1640, 1648, 1656, 1664, 1672, 1680, 1688, 1696, 1704, 1712, 1720, 1728, 1736, 1744, 1752, 1760, 1768, 1776, 1784, 1792, 1800, 1808, 1816, 1824, 1832, 1840, 1848, 1856, 1864, 1872, 1880, 1888, 1896, 1904, 1912, 1920, 1928, 1936, 1944, 1952, 1960, 1968, 1976, 1984, 1992, 2000, 2008, 2016, 2024, 2032, 2040]), energy_coeff=None, use_strip_number=False, **hist2d_kwargs)[source]

Plot the subtracted single-trigger spectrum versus channel as a 2D image

Parameters:
  • side (0 or 1) – 0 for LV side, 1 for HV side
  • binning (array-like) – The binning to use for the underlying data
  • energy_coeff (2x512 ndarray) – If not None, apply these linear coefficients (intercept, slope) to convert to energy in keV
  • use_strip_number (bool) – If True, use strip number as the horizontal axis instead of channel number
plot_spectrogram(side, time_step_in_seconds=1.0, binning=array([-128, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, 512, 520, 528, 536, 544, 552, 560, 568, 576, 584, 592, 600, 608, 616, 624, 632, 640, 648, 656, 664, 672, 680, 688, 696, 704, 712, 720, 728, 736, 744, 752, 760, 768, 776, 784, 792, 800, 808, 816, 824, 832, 840, 848, 856, 864, 872, 880, 888, 896, 904, 912, 920, 928, 936, 944, 952, 960, 968, 976, 984, 992, 1000, 1008, 1016, 1024, 1032, 1040, 1048, 1056, 1064, 1072, 1080, 1088, 1096, 1104, 1112, 1120, 1128, 1136, 1144, 1152, 1160, 1168, 1176, 1184, 1192, 1200, 1208, 1216, 1224, 1232, 1240, 1248, 1256, 1264, 1272, 1280, 1288, 1296, 1304, 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456, 1464, 1472, 1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576, 1584, 1592, 1600, 1608, 1616, 1624, 1632, 1640, 1648, 1656, 1664, 1672, 1680, 1688, 1696, 1704, 1712, 1720, 1728, 1736, 1744, 1752, 1760, 1768, 1776, 1784, 1792, 1800, 1808, 1816, 1824, 1832, 1840, 1848, 1856, 1864, 1872, 1880, 1888, 1896, 1904, 1912, 1920, 1928, 1936, 1944, 1952, 1960, 1968, 1976, 1984, 1992, 2000, 2008, 2016, 2024, 2032, 2040]), energy_coeff=None, max_triggers=1, **hist2d_kwargs)[source]

Plot a detector-side-integrated spectrogram, excluding events that exceed a specified maximum number of triggers on that side. Note that max_triggers == 1 is not quite the same as “single-trigger” events because no selection cut is imposed on the the opposite side.

Parameters:
  • side (0 or 1) – 0 for LV side, 1 for HV side
  • time_step_in_seconds (float) – The size of the time step in seconds
  • binning (array-like) – The binning to use for the underlying data
  • energy_coeff (2x512 ndarray) – If not None, apply these linear coefficients (intercept, slope) to convert to energy in keV
  • max_triggers (int) – Exclude events that have more than this number of triggers on the specified side
plot_spectrum(asiccha, binning=array([ 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, 512, 520, 528, 536, 544, 552, 560, 568, 576, 584, 592, 600, 608, 616, 624, 632, 640, 648, 656, 664, 672, 680, 688, 696, 704, 712, 720, 728, 736, 744, 752, 760, 768, 776, 784, 792, 800, 808, 816, 824, 832, 840, 848, 856, 864, 872, 880, 888, 896, 904, 912, 920, 928, 936, 944, 952, 960, 968, 976, 984, 992, 1000, 1008, 1016, 1024, 1032, 1040, 1048, 1056, 1064, 1072, 1080, 1088, 1096, 1104, 1112, 1120, 1128, 1136, 1144, 1152, 1160, 1168, 1176, 1184, 1192, 1200, 1208, 1216, 1224, 1232, 1240, 1248, 1256, 1264, 1272, 1280, 1288, 1296, 1304, 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456, 1464, 1472, 1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576, 1584, 1592, 1600, 1608, 1616, 1624, 1632, 1640, 1648, 1656, 1664, 1672, 1680, 1688, 1696, 1704, 1712, 1720, 1728, 1736, 1744, 1752, 1760, 1768, 1776, 1784, 1792, 1800, 1808, 1816, 1824, 1832, 1840, 1848, 1856, 1864, 1872, 1880, 1888, 1896, 1904, 1912, 1920, 1928, 1936, 1944, 1952, 1960, 1968, 1976, 1984, 1992, 2000, 2008, 2016, 2024, 2032, 2040, 2048, 2056, 2064, 2072, 2080, 2088, 2096, 2104, 2112, 2120, 2128, 2136, 2144, 2152, 2160, 2168, 2176, 2184, 2192, 2200, 2208, 2216, 2224, 2232, 2240, 2248, 2256, 2264, 2272, 2280, 2288, 2296, 2304, 2312, 2320, 2328, 2336, 2344, 2352, 2360, 2368, 2376, 2384, 2392, 2400, 2408, 2416, 2424, 2432, 2440, 2448, 2456, 2464, 2472, 2480, 2488, 2496, 2504, 2512, 2520, 2528, 2536, 2544, 2552, 2560, 2568, 2576, 2584, 2592, 2600, 2608, 2616, 2624, 2632, 2640, 2648, 2656, 2664, 2672, 2680, 2688, 2696, 2704, 2712, 2720, 2728, 2736, 2744, 2752, 2760, 2768, 2776, 2784, 2792, 2800, 2808, 2816, 2824, 2832, 2840, 2848, 2856, 2864, 2872, 2880, 2888, 2896, 2904, 2912, 2920, 2928, 2936, 2944, 2952, 2960, 2968, 2976, 2984, 2992, 3000, 3008, 3016, 3024, 3032, 3040, 3048, 3056, 3064, 3072, 3080, 3088, 3096, 3104, 3112, 3120, 3128, 3136, 3144, 3152, 3160, 3168, 3176, 3184, 3192, 3200, 3208, 3216, 3224, 3232, 3240, 3248, 3256, 3264, 3272, 3280, 3288, 3296, 3304, 3312, 3320, 3328, 3336, 3344, 3352, 3360, 3368, 3376, 3384, 3392, 3400, 3408, 3416, 3424, 3432, 3440, 3448, 3456, 3464, 3472, 3480, 3488, 3496, 3504, 3512, 3520, 3528, 3536, 3544, 3552, 3560, 3568, 3576]))[source]

Plot the raw spectrum for a specified channel

Parameters:
  • asiccha (tuple or int) – Either (ASIC#, channel#) if a tuple or ASIC# * 64 + channel# if an int
  • binning (array-like) – The binning to use for the underlying data
plot_subtracted_spectrum(asiccha, binning=array([-128, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, 512, 520, 528, 536, 544, 552, 560, 568, 576, 584, 592, 600, 608, 616, 624, 632, 640, 648, 656, 664, 672, 680, 688, 696, 704, 712, 720, 728, 736, 744, 752, 760, 768, 776, 784, 792, 800, 808, 816, 824, 832, 840, 848, 856, 864, 872, 880, 888, 896, 904, 912, 920, 928, 936, 944, 952, 960, 968, 976, 984, 992, 1000, 1008, 1016, 1024, 1032, 1040, 1048, 1056, 1064, 1072, 1080, 1088, 1096, 1104, 1112, 1120, 1128, 1136, 1144, 1152, 1160, 1168, 1176, 1184, 1192, 1200, 1208, 1216, 1224, 1232, 1240, 1248, 1256, 1264, 1272, 1280, 1288, 1296, 1304, 1312, 1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456, 1464, 1472, 1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576, 1584, 1592, 1600, 1608, 1616, 1624, 1632, 1640, 1648, 1656, 1664, 1672, 1680, 1688, 1696, 1704, 1712, 1720, 1728, 1736, 1744, 1752, 1760, 1768, 1776, 1784, 1792, 1800, 1808, 1816, 1824, 1832, 1840, 1848, 1856, 1864, 1872, 1880, 1888, 1896, 1904, 1912, 1920, 1928, 1936, 1944, 1952, 1960, 1968, 1976, 1984, 1992, 2000, 2008, 2016, 2024, 2032, 2040]))[source]

Plot the common-mode-subtracted spectrum for a specified channel

Parameters:
  • asiccha (tuple or int) – Either (ASIC#, channel#) if a tuple or ASIC# * 64 + channel# if an int
  • binning (array-like) – The binning to use for the underlying data
s

Shorthand for the single_triggers attribute

s_hv

Shorthand for the single_triggers_lv attribute

s_lv

Shorthand for the single_triggers_lv attribute

save(save_file=None, use_current_directory=False)[source]

Save the parsed data for future reloading. The data is stored in gzip-compressed binary pickle format.

Parameters:
  • save_file (str) – The name of the save file to create. If none is provided, the default is the name of the telemetry file with the extension ”.ge?.pgz” appended if a single telemetry file is the source.
  • use_current_directory (bool) – If True, remove any directory specification from save_file

Notes

Save files may not be compatible between Python 2 and 3

t

Shorthand for the trigger attribute

v

Shorthand for the veto attribute

vh

Shorthand for the HV guard-ring vetoes

vl

Shorthand for the LV guard-ring vetoes

vm

Shorthand for the multiple-trigger vetoes

vs

Shorthand for the shield vetoes