Recorder module

Main module

Logging module

Module for logging Velocity data form the Gramophone into HDF5 files.

class logger.DummyRecord[source]

A record with random data insted of recorded velocity. Can be used for testing purposes.

class logger.FileRecord(file_group)[source]

A velocity record that is saved in a HDF5 file.

comment

Returns the record’s comment form file

finish_time

Returns the finish time form file

mean_vel

Returns the record’s mean velocity form file

rec_id

Returns the record’s ID form file

start_time

Returns the start time form file

times

Returns the time data form file

velocities

Returns the velocity data form file

class logger.MemoryRecord(rec_id)[source]

A velocity record that is in memory ie. not saved yet.

append(gtime, vel, rec)[source]

Appends this record with the given time and velocity if the recording state is 1.

finish()[source]

Called then the recording to this record is finished. Saves the current time as the finish time.

start()[source]

Called when recording to this record is started. Saves the current time as the start time.

class logger.Record[source]

Abstract class for velocity records.

date_hr

A property that holds the starting date in a human readable format defined by the data_format class variable.

finish_time_hr

A property that holds the finishing time in a human readable format defined by the time_format class variable.

length

A property that holds the length of this recording in seconds.

length_hr

A property that holds the length of the recording in a human readable format defined by the length_format class variable.

mean_vel

A property that holds the mean of the recorded velocities.

save(log_file)[source]

Saves this record into a file and returns a FileRecord that can replace it.

Parameters:log_file (h5py.File) – An opened HDF5 file
start_time_hr

A property that holds the starting time in a human readable format defined by the time_format class variable.

unique_id

A property that stores a unique id based on the start time of this record. Used for naming folders in the HDF5 file.

class logger.VelocityLog[source]

A container object for velocity recordins. Handles saving records to HDF5 files.

save()[source]

Saves all records from this log to file.