D_scan_creation¶
__init__¶
-
__init__
(self, control, steps=1024, start=-256, stop=256, E_0=1, omega_0=10, delta=3, glass_dis=5e5, phase_control = "none")¶ the initialisation function.
Parameters: - control ("E_omega" or "E_t") – Takes the values either “E_omega” or “E_t”. It controls whether the pulse is created from a time or frequency space description.
- steps – The number of steps in time. Used to define the time axis.
- start – The start time (fs)
- stop – The stop time (fs)
- E_0 – The maximum amplitude of the electric field.
- omega_0 – The central frequency of the pulse
- delta – If control is “E_t” it is the width of the gaussian in the time axis.
- glass_dis – The maximum insertion distance of the glass in nm
- phase_control ("none" or "phi_quadratic" or "phi_cubic") – “phi_quadratic” gives a random quadratic phase in frequency space and “phi_cubic” gives a random cubic phase in frequency space. “none” results in no phase being added.
Return type: None
my_compress¶
-
my_compress
(self, in_a, compression_ratio_x, compression_ratio_y)¶ -
A custom made compression function that takes the average of the nearest points for a 2-D array
Parameters: - in_a – the array that is to be compressed.
- compression_ratio_x – the factor by which the x axis is to be compressed by.
- compression_ratio_y – the factor by which the y axis is to be compressed by.
Return type: compressed array
h5out¶
-
h5out
(self, arg1) -
Saves the compressed pulse into an hdf5 file in the pulses folder.
Parameters: arg1 – The sub-folder in which the pulse is to be saved in the pulses folder.
make_dscan_all¶
-
make_dscan_all
(self)¶ -
creates a p1color or imshow plot of the compressed dscan trace.
make_E_omega_plot¶
-
make_E_omega_plot
(self)
make_E_omega_plot2¶
-
make_E_omega_plot2
(self)¶ makes a plot of E as a function of omega but sliced above omega = 2 rad/fs
make_plots¶
-
make_plouts
(self, control="all")¶ -
a control function for calling the other plot functions.
Parameters: control ("all" or "dscan") – either generates all the plots or just the dscan.
D_trace¶
-
D_trace
(self, E_omega, k, z, r)¶ Parameters: - E_omega –
- k – Wavevector
- z – Glass insertion distance
- r – Response function
Return type: the dscan at a single glass insertion.
E_gaussian¶
-
E_gaussian
(self, t, E_0, omega_0, delta_t)¶ Parameters: - t –
- E_0 –
- omega_0 –
- delta_t –
Return type: E, A gaussian distributed(in time) E field
E_omega_gen¶
-
E_omega_gen
(self, delta_omega=3, omega_cent=2, E_0=1)¶ Parameters: - delta_omega –
- omega_cent –
- E_0 –
Return type: E_omega a gaussian distributed(in omega) E field
make_phi¶
-
make_phi
(self, control, centred = 2, phi_slope=1.0)¶ Parameters: - control ("phi_quadratic" or "phi_cubic") –
- centred – the central frequency of either the cubic or quadratic function.
- phi_slope – the gradient of the cubic or quadratic function
Return type: phi, The phase of the Electric field in omega.
make_psi¶
-
make_psi
(self, control, t_centred=0, psi_slope=1)¶ Parameters: - control ("psi_quadratic" or "psi_cubic") –
- centred – the central frequency of either the cubic or quadratic function.
- psi_slope – the gradient of the cubic or quadratic function
Return type: psi, The phase of the Electric field in time.