log package
log.logging_server module
Logs messages received from other LabRAD nodes. Also the wavemeter, for some reason.
- class log.logging_server.LoggingServer
Bases:
LabradServerLogs messages received from other LabRAD nodes
- __init__()
- get_next_shot(self, c)
Determines the number for the next shot based on the highest numbered directory in the current day’s dataserver folder.
- Parameters:
c – A LabRAD context (not used)
- Returns:
the number for the next shot
- Return type:
- get_path(self, c)
Returns the path where the current shot’s data is saved.
- Parameters:
c – A LabRAD context
- get_shot(c, name)
get_path(self, c)
Returns the current shot. If the current shot is None, return -1.
- Parameters:
c – A LabRAD context
- initServer()
Initialize Server.
Called after registering settings and creating a client connection to labrad, but before we start serving requests.
- log(self, c, message, time=None)
Saves a timestamped message to the log file. The name of the sender is also recorded (so the client needs to call
set_name()first!).- Parameters:
c – A LabRAD context
message (string) – The message to record
time (datetime.datetime, optional) – The time to record. Defaults to None, in which case the current time is used.
- log_frequency(self)
Records the current wavemeter frequencies (and the frequency for the K trap lock in the last column.)
- name = '%LABRADNODE%_logging'
- set_name(self, c, name)
Sets the name of the client’s connection. The name is entered in the log when messages are sent, so this function must be called before
log()is run.- Parameters:
c – A LabRAD context
name (string) – The name of the client’s connection
- set_save_location()
Sets the save location based on the current time and shot number.
- set_shot(self, c, shot=None)
Sets the number of the shot to record, which determines the folder in which data is saved. The shot number is reset daily. If the shot number is None, the experiment is considered idle. This means files are stored in the day’s folder on the dataserver. The wavemeter is also set to log at a lower rate when the experiment is idle.
- Parameters:
c – A LabRAD context (not used)
shot (int, optional) – The number of the shot to record. Defaults to None, which sets the program to log the idle experiment.
- shot_updated = <labrad.server.Signal object>
log.dashboard module
- class log.dashboard.laser_dashboard_gui(*args: Any, **kwargs: Any)
Bases:
QMainWindowDisplays the status of the laser locks, including the measured laser frequencies and an indicator if the laser is unlocked. Also provides audible warnings when lasers come unlocked.
- __init__(Parent=None)
- initialize()
lays out buttons and labels in the window per the channels listed in the config file.
- pressed(button, i)
Resets unlocked status when a button corresponding to a laser is pressed.
- Parameters:
button (QtWidgets.QPushButton) – The button that was pressed
i (int) – The index of the button
- status()
Called every 100 ms.
- update()
Gets the latest data from the wavemeter and updates buttons and plays warning audio if laser is unlocked.
- updateStirapField(i)