experiments.ft_viper module

Providing the “FT VIPER” experiment. This experiment is an IR pump time domain experiment. The pump pulse is split into two with a Michelson interferometer. These pulses spatially overlap while the temporal overlap is “scanned” with the movable path of the interferometer. During the measurement, a motorized stage “scans” the temporal overlap with a user defined frequency and amplitude (see pi_control.py). The IR pump pulse pair is used to excite the sample into the first vibrational state. A second, chopped UV/VIS pump pulse then excites the molecules from that higher vibrational state to an electronically excited state that is also vibrationally excited. A probe pulse is then used to determine the molecular response. The IR pump pulse must temporally come before the UV/VIS pump pulse. Therefore the stages need to be set accordingly. To reduce IR pump light scattering on the detector, a wobbler is used to phase cycle the pump pulse. The UV/VIS chopper, and only the UV/VIS chopper needs to be running for this experiment. To prevent the sample from being burnt a micrometer screw is used to continuously move the sample up and down.

VIPER stands for Vibrationally Promoted Electronic Resonance. Time domain VIPER experiments use 1 chopper. The IR Pump comes from the Michelson interferometer and its molecular response is measured in the time domain, thus no chopper is required. The UV/VIS pump pulse is chopped. Frequency domain VIPER measurements typically contain 4 different types of signals. However, time domain VIPER measurements are calculated differently.

All different time domain difference signals:

  • (IR on, UV off): IR pump/IR probe

  • (IR on, UV on): VIPER + IR pump/IR probe

The Background and the TRIR signal do not cause an oscillating signal in the time domain - only an offset which is removed upon fourier transform.

Procedure to Start a FT VIPER Measurement:

  1. Wait until laser is warmed up and measure output

  2. Optimize OPA (Optical parametric amplifier) 1 (IR probe) and OPA 2 (IR pump) on output power

  3. Align beam pointing on iris for the delayline. For that, use the “Ophir” powermeter and turn off the dry air because of the sensitivity of the powermeter. It observes the fluctuations and cannot return the laser power reliably

  4. Optimize OPA 3 (UV pump) on output power at the sample

  5. Set the overlap of the pump OPAs with the probe OPA using a pinhole or a sample. For this, reduce the UV/VIS power (with filter) below 0.5 microJ for pinhole or GaAs (Gallium arsenide)

  6. Optimize the chopper phases, delays and Wobbler (see show_signal_wobbler for detailed procedure). This step is difficult and crucial. FT Viper: UV/VIS 1/8, Wobbler 1/4. Note that it may be necessary to setup both the IR and UV/VIS chopper to adjust the choppers and observe a VIPER signal in show_viper_wobbler experiment even though the FT-Viper only needs the UV/VIS chopper. For steps 7 and 8 show_signal_wobbler (UV and IR), show_viper_wobbler are required

  7. Check chopper phases using photo diodes (if available in setup). The pyroelectric detector on the oscilloscope can also give insight into the chopper phase

  8. Optimize the chopper output phases by optimizing signal size

  9. Measure time t zero (temporal overlap) for both OPAs with scan tzero experiment. For this, block the movable path of the interferometer

  10. Measure the temporal overlap using scan t zero experiment of the movable path of the interferometer. For that, block the static path

  11. Optimize the spatial overlap in the sample for OPA 3 and for the movable path of the interferometer of OPA 2 using the overlap mirrors. For the static path of the interferometer use the second mirror of the static path

  12. Optimize the chopper phases using the show_viper_wobbler experiment (colorful experiment). Also check the background at -20,000 fs. It should be zero

  13. Optimize the delay between the pump pulses

  14. Cry and probably repeat from step 6

  15. If everything up until now works (wow you are a wizard!) turn off the IR Chopper. If the IR chopper is still on, the interferogram is going to be unsightly

  16. Set the wavegeneration parameters appropriately for the molecule that you want to measure (i.e. coherence time 2ps, frequency 0.4 Hz speedupdown 150, overshoot factor 0.1). This step requires a lot of testing, especially if this was never done before

  17. Refill the detector, check your file name, check if the data will be saved (for important measurements raw data should always be saved)

  18. Start the FT-Viper experiment

  19. Go home crying

References

For understanding the general procedure and setup:

  • ft_2d_ir.py (for wavegeneration and alignment of the interferometer. Additional information on the pyroelectric detector and the photodiodes as well as the R-2R network can be found there)

  • show_signal_wobbler.py

  • show_wobbler_states.py

  • show_viper_wobbler.py

Note

Delay Files:

If more than one delay file is required for an experiment (e.g. VIPER) the weights of all files are multiplied to yield a resulting weight. Generally, the delay files have to increase monotonously. For VIPER experiments the UV/VIS delay file does not have to increase monotonously. The IR delay file has to. For VIPER the delays files need to have a user given offset (time delay between the pump pulses). This is due to the fact that the IR pump pulse should temporally “arrive” before the UV/VIS pump pulse such that the VIPER signal is maximal. This time delay can be found by conducting a broadband VIPER experiment where the UV/VIS Stage is “scanned” while the IR delay remains static and then observing for which relative delay between the stages the VIPER signal is maximal. We observed that it can happen that the stages have to be set in the opposite way (as if the UV/VIS pump pulse arrives before the IR pump pulse. For examples stage positions such as IR delay stage 20,500 fs UV/VIS delay stage 20,000 fs might yield a good VIPER signal). This is can be attributed to the imprecision in determining the t zero position for each of the stages separately.

Step by Step Algorithm:

Acquisition:

  1. Preallocate dictionary (data container) which will contain data and information about scan index, delay index etc.

  2. Close the UV/VIS Shutter to avoid unnecessary exposition to UV/VIS pump light

  3. Start moving the micrometer screw continuously

  4. Move the interferometer stage to the position where the interferometer counter needs to be reset (this is a position a few hundred femto seconds after the t zero, but not as far as the starting position of the wavegeneration)

  5. Reset the interferometer counter value to zero

  6. Move the interferometer stage to the starting position of the wavegeneration

  7. Start wavegeneration

  8. Close UV/VIS shutter

  9. Move IR and UV/VIS stage simultaneously to next respective delay

  10. Open UV/VIS Shutter

  11. Read the data from the ADC

  12. Place data into dictionary and hand it over to primary processing

Primary Processing:

  1. Preallocate arrays for data, counts, weights, chopper. Here there are 2 states for each chopper. Obtain the Chopper voltage levels and calculate the Wobbler states from the laser frequency and wobbler frequency.

  2. Subtract background from raw data (dark noise)

  3. Linearize response of pixels

  4. Calculate transmission, or more precisely, relative intensity (probe intensity / reference intensity) for each laser shot for each pixel pair

  5. Calculate interferometer positions from R-2R data for each laser shot. Check if minimum and maximum interferometer positions were observed.

  6. Identify the chopper states for all laser shots using the corresponding channel(s) in the ADCs’ data

  7. Identify the different wobbler states for all laser shots

  8. Sort the data (transmissions) for each state and calculate statistics

  9. Phase cycle by averaging the wobbler states in the transmission space. Calculate the resulting phase cycled counts and weights

  10. Average the phase cycled data by weighting equally. If averaging fails because not all states were observed ignore exception so that the graphs still will be displayed later

  11. Put this information into data container and hand it over to secondary processing

  12. Save data (and raw data) including counts and weights if respective checkboxes on GUI were checked

Secondary Processing:

  1. Preallocate arrays and variables to hold time domain viper spectrum, time domain 2d ir spectrum, freq domain viper spectrum, freq domain 2d ir spectrum, zerobin, pump frequency axis, opa range, central pump wavenumber, opa spectrum, interpolated phase cycled viper signal, interpolated phase cycled 2d ir signal

  2. Obtain the interferogram. For this we need the phase cycled counts because we want to average the interferograms of the UV/VIS chopper being turned open and closed (using the phase cycle counts as weights can fail, therefore use try except statements to make sure that the interferogram etc. are still displayed)

  3. Calculate all the different time domain difference signals Last axis UV/VIS pump on-off Beginners notes (IR Pump in time domain):

    • (IR on, UV off): IR pump/IR probe

    • (IR on, UV on): VIPER + IR pump/IR probe

    The Background and the TRIR signal do not cause an oscillating signal in the time domain - only an offset which is removed upon fourier transform

  4. Process the single scan data:

    • Calculate frequency domain VIPER absorption spectrum

    • Calculate frequency domain 2D-IR absorption spectrum

    • Extract the relevant information regarding the spectrum of the OPA

    • Obtain pump frequency axis

  5. Process averaged data:

    • Calculate frequency domain VIPER absorption spectrum

    • Calculate frequency domain 2D-IR absorption spectrum

    • Extract the relevant information regarding the spectrum of the OPA

    • Obtain pump frequency axis

  6. Use try except statements to make sure that the information about the interferometer can still be displayed even if an error occurs (e.g. if the wavegeneration parameters are chosen poorly)

  7. Calculate VIPER time domain spectrum for each wobbler state for central pixel to double check whether phase cycling is working

  8. Calculate the average intensity for each pixel

  9. Calculate the average intensities and standard deviation of the intensities for each pixel

  10. Put this information into data container and hand it over to Pyqtplotting thread

  11. Calculate the numbers which are displayed in the “statistics box” on the GUI

Pyqt Plotting:

  1. Remove old plots

  2. Setup the plot that displays:
    • Single 2d ir signal heatmap with histogram

    • Single viper signal heatmap with histogram

    • Average viper signal heatmap with histogram

    • Interferogram

    • Opa spectrum

    • Time domain spectrum of central pixel for all wobbler states

    • Intensities and their standard deviation (multiplied by 5)

    • Counts (How often a position was measured)

    • Stage position

  3. Plot the plots for the first time

  4. Update plots.

Saving:

Note that the phase cycled transmission is saved. Therefore there exists no dimension for the Wobbler states.

Programming data dimension:
[(2 ([0] is current average scan, [1] is last single scan), n_delays, n_probe_pixels, n_interferometer_states, n_vis_chopper_states, n_wobbler_states)]

saving dimension:
[(n_probe_pixels, n_interferometer_states, n_vis_chopper_states, n_wobbler_states)]

raw data dimension:
[(n_channels, samples_to_acquire)]

Folder Structure

In scans/ the first file of 3 contains the data in the saving dimensions. The counts file contains the number of times a given state was observed. This should be used as weights when averaging equally weighted. The weights file contains the inverse variances of a given state for all pixels, etc. The dimensions of these files are as the saving dimension suggests. These files can be used to average in different ways in order to obtain the complete resulting spectrum. Check the actual code of the corresponding experiment to understand how to calculate the desired end result (difference spectrum).

The data in /averaged_data is averaged equally weighted (using counts). Likewise to the scan data the difference spectrum still needs to be calculated from the transmissions for every state. Because the array contains the transmissions averaged with counts it is only intended to be used as a first indicator for the measurement. Here time domain data was averaged. Please note that better quality can be achieved when Fourier transforming first and averaging in the frequency domain. This has to with the phasing that varies from scan to scan.

The /figure folder is currently empty. It is possible to implement plotting of figures which are saved here while the experiment is running. This is however not implemented yet.

The /hardware config folder holds every file which contains hardware configuration parameters. This folder is a compressed copy of the hardware configuration folder in the software’s directory. Here it is possible to look up the ADC configuration to obtain what channel was connected to which hardware element (e.g. chopper - ai78). It is also possible to obtain the R-2R values, the FPAS configuration, the linearization parameters, etc.

The /raw data folder is in the experiments directory only if the “save raw data” checkbox on the GUI was checked. It contains the raw (unedited… as raw as it can get) data. Basically, the voltages which the ADC measured for each channel. The dimensions are as “raw data dimensions” suggests.

The background.npy file is a copy of the most recently collected dark noise background of the MCT detector array. It corrects for dark noise. If no new background was collected before the experiment was started the code will use the latest available background and display a warning in the log.

setupinfo.txt is a ReadMe file that contains the most relevant experimental parameters at first glance. Additionally, the user can decide to write a comment in the readme editor of the GUI. The content of this is written to the notes.txt file.

probe_wn_axis.npy contains the wavenumber axis which is generated by the spectrometer triax.py class.

delays.npy contains the delays including weights.

username/
├── date1_experimentname1_000/
│   ├── averaged_data
│   │   ├──  d000_date1_experimentname1_000.npy
│   │   ├──  ...
│   │   └──  d999_date1_experimentname1_000.npy
│   ├── figures
│   ├── hardware config
│   ├── raw data
│   │   ├──  delay000
│   │   │   ├──  s000000_d000_date1_experimentname1_000_raw.npy
│   │   │   ├──  ...
│   │   │   └──  s000099_d000_date1_experimentname1_000_raw.npy
│   │   ├──  ...
│   │   └──  delay999
│   ├── scans
│   │   ├──  delay000
│   │   │   ├──  s000000_d000_date1_experimentname1_000.npy
│   │   │   ├──  s000000_d000_counts_date1_experimentname1_000.npy
│   │   │   ├──  s000000_d000_weights_date1_experimentname1_000.npy
│   │   │   ├──  ...
│   │   │   └──  s000099_d000_date1_experimentname1_000.npy
│   │   ├──  ...
│   │   └──  delay999
│   ├── probe_wn_axis_date1_experimentname1_000.npy
│   ├── delays_date1_experimentname1_000.npy
│   ├── setupinfo_date1_experimentname1_000.txt
│   ├── notes_date1_experimentname1_000.txt
│   └── background_date1_experimentname1_000.npy
├── date1_experimentname1_001/
├── date2_experimentname1_000/
└── date2_experimentname2_000/
class Acquisition(vis_delays: numpy.ndarray, ir_delays: numpy.ndarray, adc: analog_digital_converter.AnalogDigitalConverter, vis_delay_stage: pi_control.PiStage, ir_delay_stage: pi_control.PiStage, interferometer_stage: pi_control.PiStage, interferometer_counter: interferometer_counter.InterferometerCounter, spectrometer: triax.Triax, mu_screw: newport_control.NewportControl, vis_shutter: shutter.Shutter, acq_queue: multiprocessing.context.BaseContext.Queue)[source]

Bases: threading.Thread

Parameters
  • vis_delays (ndarray) –

    Array containing the delays in fs for the UV/VIS stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • ir_delays (ndarray) –

    Array containing the delays in fs for the IR stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • adc (ADC) – Analog to digital converter hardware object which is used to communicate with and read data from the ADC.

  • vis_delay_stage (PiStage) – PiStage hardware control object which provides the interface to the UV/VIS delay stage.

  • ir_delay_stage (PiStage) – PiStage hardware control object which provides the interface to the IR delay stage.

  • interferometer_stage (PiStage) – PiStage hardware control object which provides the interface to the interferometer stage.

  • interferometer_counter (InterferometerCounter) – InterferometerCounter object which provides the functionalities necessary to use the interferometer counter electronics.

  • spectrometer (Spectrometer) – Spectrometer/Triax hardware class which grants functionality to control the triax spectrometer. Needed to obtain e.g. wavenumber axis etc.

  • mu_screw (MuScrew) – NewportControl object that can be used to move the micrometer screw.

  • vis_shutter (Shutter) – Shutter object that can be used to open and close the UV/VIS (pump) shutter.

  • acq_queue (Queue) – Multiprocessing queue object that the acquisition thread uses to pass data to the primary processing process.

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

shutdown()[source]
class FtViper(widget_pyqtgraph, vis_delays: numpy.ndarray, ir_delays: numpy.ndarray, adc: analog_digital_converter.AnalogDigitalConverter, vis_delay_stage: pi_control.PiStage, ir_delay_stage: pi_control.PiStage, interferometer_stage: pi_control.PiStage, interferometer_counter: interferometer_counter.InterferometerCounter, prl: data_processing.PixelResponseLinearization, vis_chopper_info: dict, he_ne_wl: float, wobbler_freq: float, background_handler: save_data.Background, spectrometer: triax.Triax, mu_screw: newport_control.NewportControl, vis_shutter: shutter.Shutter, info_queue: multiprocessing.context.BaseContext.Queue, saver: Optional[save_data.SaveData] = None)[source]

Bases: object

Parameters
  • widget_pyqtgraph (QWidget) – WidgetPyqtgraph object on which the plots are going to be displayed. Has methods for plot manipulation (i.e. removal of plots, autoscale).

  • vis_delays (ndarray) –

    Array containing the delays in fs for the UV/VIS stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • ir_delays (ndarray) –

    Array containing the delays in fs for the IR stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • adc (ADC) – Analog to digital converter hardware object which is used to communicate with and read data from the ADC.

  • vis_delay_stage (PiStage) – PiStage hardware control object which provides the interface to the UV/VIS delay stage.

  • ir_delay_stage (PiStage) – PiStage hardware control object which provides the interface to the IR delay stage.

  • interferometer_stage (PiStage) – PiStage hardware control object which provides the interface to the interferometer stage.

  • interferometer_counter (InterferometerCounter) – InterferometerCounter object which provides the functionalities necessary to use the interferometer counter electronics.

  • prl (PRL) – Pixel response linearization object which grants the functionality to linearize raw data according to the linearization parameters specified in the corresponding pixel_linearization_fit_parameters.json file (for each lab).

  • vis_chopper_info (dict) – Contains the information that is necessary to identify the different chopper states of the chopper that chops the UV/VIS pump pulse. It contains the keys “high voltage level” and “name”. “high voltage level” is the voltage read by the ADC when the chopper reference output is high. It is needed as a reference for the digitization function that is used. The “name” key is required to determine to which channel of the adc the chopper is connected and its value needs to match the corresponding key in index_dict.

  • he_ne_wl (float) – Wavelength of the light source (generally a Helium-Neon laser) which is used for determining the position of the interferometer stage via the photodiodes and the counter electronics.

  • wobbler_freq (float) – Frequency in Hz with which the wobbler oscillates.

  • background_handler (Background) – Instance of Background class which can access the most recently collected background. This background is later subtracted from the raw data as dark noise correction.

  • spectrometer (Spectrometer) – Spectrometer/Triax hardware class which grants functionality to control the triax spectrometer. Needed to obtain e.g. wavenumber axis etc.

  • mu_screw (MuScrew) – NewportControl object that can be used to move the micrometer screw.

  • vis_shutter (Shutter) – Shutter object that can be used to open and close the UV/VIS (pump) shutter.

  • info_queue (Queue) – Multiprocessing queue object which is used to transfer/hand over information to lineEdits on GUI. Contains (if applicable) scan index, delay index, interleave index, values for statistics groupBox etc.

  • saver (SaveData) – Object that manages saving of data (including counts, weights, probe wavenumber axis etc.) into their respective directories. If None is passed, no data is going to be saved. If the raw data checkbox was checked on the GUI the savers raw data attribute is set to True and the raw data is saved automatically. Defaults to None.

start()[source]
class PrimaryProcessing(acq_queue: multiprocessing.context.BaseContext.Queue, processing_queue: multiprocessing.context.BaseContext.Queue, vis_delays: numpy.ndarray, ir_delays: numpy.ndarray, pixel_idx: numpy.ndarray, probe_pixel_idx: numpy.ndarray, reference_pixel_idx: numpy.ndarray, index_dict: dict, r2r_indices: numpy.ndarray, prl: data_processing.PixelResponseLinearization, vis_chopper_info: dict, wobbler_freq: float, laser_freq: float, interferometer_states: int, bin_reference_values: numpy.ndarray, background_handler: save_data.Background, saver: Optional[save_data.SaveData] = None)[source]

Bases: multiprocessing.context.Process

Parameters
  • acq_queue (Queue) – Multiprocessing queue object that the acquisition thread uses to pass data to the primary processing process.

  • processing_queue (Queue) – Multiprocessing queue object that the primary processing process uses to pass data to the secondary processing process.

  • vis_delays (ndarray) –

    Array containing the delays in fs for the UV/VIS stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • ir_delays (ndarray) –

    Array containing the delays in fs for the IR stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • pixel_idx (ndarray) –

    Array that contains the indices of the rows in the ADCs’ data that correspond to pixel input channels. These are specified in the “analog input configuration.json” for each laboratory and can be easily accessed with the attribute “pixel_idx” of the ADC.

    • shape: 1D

    • E.g.: (64) or (128)

  • probe_pixel_idx (ndarray) –

    Array that contains the indices of the rows in the ADCs’ data that correspond to probe pixel input channels. These are specified in the “analog input configuration.json” for each laboratory and can be easily accessed with the attribute “probe_pixel_idx” of the ADC. It is highly relevant that the order the pixels are listed in this array match the order of the array in the reference_pixel_idx argument. This means that if reference pixel 3 is listed first in the other array here probe pixel 3 needs to be listed first as well and so on. Otherwise the intensities on the probe array are not going to be normalized correctly. For the plotting to work correctly the pixels also need to be listed in the order of the wavenumber axis array of the spectrometer.

    • shape: 1D

    • E.g.: (32) or (64)

  • reference_pixel_idx (ndarray) –

    Array that contains the indices of the rows in the ADCs’ data that correspond to reference pixel input channels. These are specified in the “analog input configuration.json” for each laboratory and can be easily accessed with the attribute “reference_pixel_idx” of the ADC. It is highly relevant that the order the pixels are listed in this array match the order of the array in the probe_pixel_idx argument. This means that if probe pixel 10 is listed first in the other array here reference pixel 10 needs to be listed first as well and so on. Otherwise the intensities on the probe array are not going to be normalized correctly. For the plotting to work correctly the pixels also need to be listed in the order of the wavenumber axis array of the spectrometer.

    • shape: 1D

    • E.g.: (32) or (64)

  • index_dict (dict) – Dictionary that maps the names of the input channels to their corresponding row in the ADCs’ data as they are specified in the “analog input configuration.json” for each laboratory. I.e.: It contains the information which entries of the ADCs’ data array belong choppers, wobblers etc. This dictionary can be easily accessed with the attribute “index_dict” of the ADC.

  • r2r_indices (ndarray) –

    Array that contains the indices of the rows in the ADCs’ data that correspond to R-2R input channels in ascending order of significance (LSB channel first, etc.)

    • shape: 1D

    • E.g.: (4)

  • prl (PRL) – Pixel response linearization object which grants the functionality to linearize raw data according to the linearization parameters specified in the corresponding pixel_linearization_fit_parameters.json file (for each lab).

  • vis_chopper_info (dict) – Contains the information that is necessary to identify the different chopper states of the chopper that chops the UV/VIS pump pulse. It contains the keys “high voltage level” and “name”. “high voltage level” is the voltage read by the ADC when the chopper reference output is high. It is needed as a reference for the digitization function that is used. The “name” key is required to determine to which channel of the adc the chopper is connected and its value needs to match the corresponding key in index_dict.

  • interferometer_states (int) – Number of interferometer states that are expected to be observed given a coherence time.

  • wobbler_freq (float) – Frequency in Hz with which the wobbler oscillates.

  • laser_freq (float) – Frequency (repetition rate) of the laser in Hz.

  • bin_reference_values (ndarray) –

    Reference values for each of the R-2R networks.

    • shape: 2D (4, 15) 4 rows for each of the R-2R Networks, 15 values for the 16 levels of the R-2R.

  • background_handler (Background) – Instance of Background class which can access the most recently collected background. This background is later subtracted from the raw data as dark noise correction.

  • saver (SaveData) – Object that manages saving of data (including counts, weights, probe wavenumber axis etc.) into their respective directories. If None is passed, no data is going to be saved. If the raw data checkbox was checked on the GUI the savers raw data attribute is set to True and the raw data is saved automatically. Defaults to None.

run()[source]

Method to be run in sub-process; can be overridden in sub-class

class PyqtPlotting(widget_pyqtgraph, adc: analog_digital_converter.AnalogDigitalConverter, plot_queue: multiprocessing.context.BaseContext.Queue, vis_delays: numpy.ndarray, ir_delays: numpy.ndarray, central_pixel: int)[source]

Bases: object

Pyqt Plotting class (Qt multithreaded). This class is necessary for displaying plots on the GUI. PyQtGraph is used as the plotting engine. Generally the plots are set up first (type of plot, layout, title etc.). On the first run, the plots are drawn for the first time. Then the plots are updated every iteration. We update the same plot references every time to make it more efficient.

Parameters
  • widget_pyqtgraph (QWidget) – WidgetPyqtgraph object on which the plots are going to be displayed. Has methods for plot manipulation (i.e. removal of plots, autoscale).

  • adc (ADC) – Analog to digital converter hardware object which is used to communicate with and read data from the ADC.

  • plot_queue (Queue) – Multiprocessing queue object that the secondary processing process uses to pass data to the plot thread.

  • vis_delays (ndarray) –

    Array containing the delays in fs for the UV/VIS stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • ir_delays (ndarray) –

    Array containing the delays in fs for the IR stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • central_pixel (int) – Index of the central pixel of the detector. Used to display the signal on the central pixel.

class Signals[source]

Bases: PyQt5.QtCore.QObject

new_data
run()[source]
update_plot(data_container)[source]
class SecondaryProcessing(processing_queue: multiprocessing.context.BaseContext.Queue, plot_queue: multiprocessing.context.BaseContext.Queue, info_queue: multiprocessing.context.BaseContext.Queue, vis_delays: numpy.ndarray, ir_delays: numpy.ndarray, probe_pixel_idx: numpy.ndarray, interferometer_states: int, central_pixel, saver: Optional[save_data.SaveData] = None)[source]

Bases: multiprocessing.context.Process

Parameters
  • processing_queue (Queue) – Multiprocessing queue object that the primary processing process uses to pass data to the secondary processing process.

  • plot_queue (Queue) – Multiprocessing queue object that the secondary processing process uses to pass data to the plot thread.

  • info_queue (Queue) – Multiprocessing queue object which is used to transfer/hand over information to lineEdits on GUI. Contains (if applicable) scan index, delay index, interleave index, values for statistics groupBox etc.

  • vis_delays (ndarray) –

    Array containing the delays in fs for the UV/VIS stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • ir_delays (ndarray) –

    Array containing the delays in fs for the IR stage in the 0th column and their corresponding weights in the 1st column. I.e.: loaded from a delay file which can be generated via the delay file editor. These delays need to be temporally offset relative to the IR delays.

    • shape: 2D

    • E.g.: (number of delays, 2)

  • probe_pixel_idx (ndarray) –

    Array that contains the indices of the rows in the ADCs’ data that correspond to probe pixel input channels. These are specified in the “analog input configuration.json” for each laboratory and can be easily accessed with the attribute “probe_pixel_idx” of the ADC. It is highly relevant that the order the pixels are listed in this array match the order of the array in the reference_pixel_idx argument. This means that if reference pixel 3 is listed first in the other array here probe pixel 3 needs to be listed first as well and so on. Otherwise the intensities on the probe array are not going to be normalized correctly. For the plotting to work correctly the pixels also need to be listed in the order of the wavenumber axis array of the spectrometer.

    • shape: 1D

    • E.g.: (32) or (64)

  • interferometer_states (int) – Number of interferometer states that are expected to be observed given a coherence time.

  • central_pixel (int) – Index of the central pixel of the detector. Used to display the signal on the central pixel.

  • saver (SaveData) – Object that manages saving of data (including counts, weights, probe wavenumber axis etc.) into their respective directories. If None is passed, no data is going to be saved. If the raw data checkbox was checked on the GUI the savers raw data attribute is set to True and the raw data is saved automatically. Defaults to None.

run()[source]

Method to be run in sub-process; can be overridden in sub-class