Skip to content

pbelange/WireDAQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wire DAQ

About

The main tools of this package in Backend/NXCALS are a serie of classes used to regroup the NXCALS variable names for BBLR wires and the beam. The idea is to be able to conveniently extract the data from a dataframe following:

import Backend.NXCALS as nx
wire = nx.NXCALSWire(loc = 'L1B1')
data = database[[wire['I'],wire['V']]].dropna()

# The above is exactly equivalent to:
data = database[['RPMC.UL14.RBBCW.L1B1:I_MEAS','RPMC.UL14.RBBCW.L1B1:V_MEAS']].dropna()

# One can see all the variable names using:
display(wire)

The module also adds the nxPlot() method to Pandas dataframes, which gets rid of the nans and plots the chosen label, but otherwise works exactly in the same way as plt.plot(). To make it easier to keep track of the units, a dedicated attribute can also be used:

plt.figure()
database.nxPlot('index',wire['I'],'-o',ms=2,label = wire.loc + '.' + wire.label['I'])
plt.xlabel('Time (UTC)')
plt.ylabel(f"{wire.label['I']} [{wire.units['I']}]")
# ----
# The label call yields the same as
plt.ylabel(f"Current [A]")

To mount data folder via ssh

mkdir my_folder
sshfs [email protected]:/home/lumimod/work/run/data/2023/rawdata/ my_folder/

NXCALS installation:

This package is intended to be used on a acc computer. We first need to install nxcals and the working python environment:

bash installme.sh 

Data extraction with spark:

It can be convenient to extract the data from spark and save it locally. One can change the start_time and end_time in sparkExtractor.py and then:

kinit
ipython -i sparkExtractor.py

About

Data acquisition toolbox for BBLR wire

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages