m4.type package¶
m4.type.accelerometers_data module¶
- Authors
- Selmi: written in 2021
-
class
m4.type.accelerometers_data.AccelerometersData¶ Bases:
objectClass used to manage accelerometer data
HOW TO USE IT:
from m4.type.accelerometers_data import AccelerometersData acc = AccelerometersData() or acc = AccelerometersData.loadInfoFromAccTtFolder()
-
convertAndSaveData(start, final_destination)¶ Parameters: - start (string) – path containing the initial data
- final_destination (string) – path to save final data
-
counts_to_ms2(vec)¶ Parameters: vec (numpy array) – data vector in accelerometers plc units Returns: cal_vec – data vector in m/s*2 Return type: numpy array
-
static
loadInfoFromAccTtFolder(tt)¶ Creates the object using information about path measurements
Parameters: tt (string) – measurement tracking number Returns: theObject – acceleremoters data type class object Return type: object
-
power_spectrum()¶ Returns: - spe_list (list) – list containing the spectrum of vectors composing the matrix z
- freq_list (list) – list containing the frequencies of vectors composing the matrix z
-
read_data()¶ Returns: _datah5 – measurements data Return type: numpy array
-
m4.type.commandHistory module¶
- Authors
- Selmi: written in 2019
-
class
m4.type.commandHistory.CmdHistory(nActs)¶ Bases:
objectClass to create and manage the command history matrix
HOW TO USE IT:
from m4.type.commandHistory import CmdHistory cmdH = CmdHistory()
-
getCommandHistory()¶ Returns: ccmdHToApply – command history matrix to apply Return type: numpy array
-
getIndexingList()¶ Returns: indexingList – list of modes/actuators used to create the command history matrix Return type: list
-
static
load(tt, fits_or_h5=0)¶ Creates the object from the info.fits file located in tt
Parameters: tt (string) – tracking number Returns: theObject – command history class object Return type: object
-
saveInfo(fits_or_h5)¶ Save the data in fits format
Returns: tt – tracking number Return type: string
-
shuffleCommandHistoryMaker(mode_vector, amp_vector, cmd_matrix, n_push_pull, template=None)¶ Parameters: - modesVector (numpy array) – Mode or actuator index vector to apply
- ampVector (numpy array) – amplitude mode vector
- cmdMatrix (numpy array [nActs x nModes]) – mode command matrix diagonal matrix in case of zonal commands
- n_push_pull (int) – number of push pull for actuatores
Other Parameters: template (numpy array , optional) – vector composed by 1 and -1 (es. np.array([1, -1, 1]))
Returns: - matrixToApply (numpy array [nAct, nModes x nPushPusll x 2]) – shuffle command history
- tt (string) – tracking number
-
tidyCommandHistoryMaker(mode_vector, amp_vector, cmd_matrix, n_push_pull, template=None)¶ Parameters: - modesVector (numpy array) – Mode or actuator index vector to apply
- ampVector (numpy array) – amplitude mode vector
- cmdMatrix (numpy array [nActs x nModes]) – mode command matrix diagonal matrix in case of zonal commands
- n_push_pull (int) – number of push pull for actuatores
Other Parameters: template (numpy array , optional) – vector composed by 1 and -1 (es. np.array([1, -1, 1]))
Returns: - matrixToApply (numpy array [nAct, nModes x nPushPusll x 2]) – tidy command history
- tt (string) – tracking number
-
m4.type.modalAmplitude module¶
- Autors
- Selmi: written in 2019
-
class
m4.type.modalAmplitude.ModalAmplitude¶ Bases:
objectClass to create and manage the modal amplitude
HOW TO USE IT:
from m4.type.modalAmplitude import ModalAmplitude ma = ModalAmplitude()
-
getFitsFileName()¶ Returns: fitsfilename – path fits file name Return type: string
-
getModalAmplitude()¶ Returns: modalAmplitude – vector of modal amplitude Return type: numpy array
-
getTag()¶ Returns: tag – modal ampplitude tag Return type: string
-
static
loadFromFits(fits_file_name)¶ Creates the object
Parameters: fits_file_name (string) – modal amplitude path Returns: theObject – ModalAmplitude class object Return type: object
-
static
loadFromH5(filename)¶ Creates the object
Parameters: filename (string) – modal amplitude path Returns: theObject – ModalAmplitude class object Return type: object
-
saveAsFits(tag, modal_amplitude)¶ Save the data in fits format
Parameters: - tag (string) – file name to save
- modal_amplitude (numpy array) – vector of amplitude
-
saveAsH5(tag, modal_amplitude)¶ Save the data in h5 format
Parameters: - tag (string) – file name to save
- modal_amplitude (numpy array) – vector of amplitude
-
m4.type.modalBase module¶
@author: cs
-
class
m4.type.modalBase.ModalBase¶ Bases:
objectClass to create and manage the modal base
HOW TO USE IT:
from m4.type.modalBase import ModalBase mb = ModalBase()
-
getFitsFileName()¶ Returns: fitsfilename – path fits file name Return type: string
-
getModalBase()¶ Returns: modalBase – vector of modal base Return type: numpy array
-
getTag()¶ Returns: tag – modal base tag Return type: string
-
static
loadFromFits(fits_file_name)¶ Creates the object
Parameters: fits_file_name (string) – modal amplitude path Returns: theObject – ModalBase class object Return type: object
-
static
loadFromH5(filename)¶ Creates the object
Parameters: filename (string) – modal amplitude path Returns: theObject – ModalBase class object Return type: object
-
saveAsFits(tag, modal_base)¶ Save the data in fits format
Parameters: - tag (string) – file name to save
- modal_base (numpy array [nActs x nModes]) – command matrix
-
saveAsH5(tag, modal_base)¶ Save the data in h5 format
Parameters: - tag (string) – file name to save
- modal_bace (numpy array) – vector of modal base
-
m4.type.modesVector module¶
@author: cs
-
class
m4.type.modesVector.ModesVector¶ Bases:
objectClass to create and manage the mode vector
HOW TO USE IT:
from m4.type.modesVector import ModesVestor mv = ModesVector()
-
getFitsFileName()¶ Returns: fitsfilename – path fits file name Return type: string
-
getModesVector()¶ Returns: modesVector – vector of modes Return type: numpy array
-
getTag()¶ Returns: tag – mode vector tag Return type: string
-
static
loadFromFits(fits_file_name)¶ Creates the object
Parameters: fits_file_name (string) – modal amplitude path Returns: theObject – ModaesVector class object Return type: object
-
static
loadFromH5(filename)¶ Creates the object
Parameters: filename (string) – modal amplitude path Returns: theObject – ModesVector class object Return type: object
-
saveAsFits(tag, modes_vector)¶ Save the data in fits format
Parameters: - tag (string) – file name to save
- modes_vector (numpy array) – vector of selected modes
-
saveAsH5(tag, modes_vector)¶ Save the data in h5 format
Parameters: - tag (string) – file name to save
- modes_vector (numpy array) – vector of selectred modes
-
m4.type.temperature_sensors module¶
- Authors
- Selmi: written in 2020
HOW TO USE IT:
from m4.type import temperature_sensor as ts folder = ts.PT_calibration(n_meas) ts.analyzer_PT_meas(tt)
-
m4.type.temperature_sensors.PT_calibration(n_meas)¶ Parameters: n_meas (int) – number of measurement to store Returns: dove – data file path of measurement Return type: string
-
m4.type.temperature_sensors.analyzer_PT_meas(tt)¶ Parameters: tt (string) – tracking number folder