pnps.separation#
Separate the transient-grating field from the arms’ own Kerr light.
The nonlinear part N of the field (pnps.simulate.visit_nonlinear()) holds
everything the Kerr response generated: the three-arm transient grating, which is the
signal, and the third-order light of fewer arms, which a large collection window also
gathers: each arm’s self-phase modulation and the cross-phase modulation and
four-wave mixing of each pair. The polarisation is cubic in the field, so its
three-arm part is the term that holds one factor from every arm, and inclusion and
exclusion over the input arms isolates it: with N(S) the nonlinear part of a run
whose input holds only the arms S,
N_TG = N(123) - N(12) - N(13) - N(23) + N(1) + N(2) + N(3).
To first order in the response, where every term of N holds three factors of the
input, this is exactly the part with a factor from each arm. Beyond first order it is
the part of N that vanishes whenever any arm is absent, which is the defining
property of the three-arm signal and includes its cascaded corrections.
The windows are quadratic in the field, so the combination is made on N itself, at
every save plane, before any window acts: the separated field is then collected
through the exact hard discs (pnps.exact_windows.ExactWindows), as
Config.exact_windows collects the whole N.
Each subset is one propagation. The subsets of the gate pair alone carry no delay, so
their part N(12) - N(1) - N(2) is computed once and kept for every delay
(Separation.gate_terms()); each delay then needs the four runs with the test
arm. The runs follow each other on the one backend; the host keeps one field volume
per save plane for the combination and one for the gate part. The linear parts of
the seven runs cancel in N_TG identically (each arm enters with weights summing
to zero), so N_TG is the same combination of the propagated fields, and the
linear propagation is subtracted only for the records of the whole N(123) and of
the remainder N(123) - N_TG.
Module Attributes
The |
|
The arm subsets and their signs in |
|
The delay-free subsets and their signs in the remainder |
|
The delayed subsets other than the whole input, and their signs in the remainder. |
|
The further parts a separation records beside the transient grating: the whole nonlinear field |
Functions
|
Return the dataset names of one part's window traces. |
Classes
|
The transient-grating separation of one configuration, over its delays. |
- pnps.separation.FIELD_PART = 'transient_grating'#
The
/gridvalue offield_partin a file whoseIω_*traces hold the transient-grating field alone.
- pnps.separation.GATE_SUBSETS: tuple[tuple[tuple[str, ...], int], ...] = ((('gate1', 'gate2'), 1), (('gate1',), -1), (('gate2',), -1))#
The delay-free subsets and their signs in the remainder
N(123) - N_TG.
- pnps.separation.PARTS = ('nonlinear', 'remainder')#
The further parts a separation records beside the transient grating: the whole nonlinear field
N(123)and the remainderN(123) - N_TG.
- pnps.separation.SUBSETS: tuple[tuple[tuple[str, ...], int], ...] = ((('gate1', 'gate2', 'test'), 1), (('gate1', 'gate2'), -1), (('gate1', 'test'), -1), (('gate2', 'test'), -1), (('gate1',), 1), (('gate2',), 1), (('test',), 1))#
The arm subsets and their signs in
N_TG, the whole input first.
- pnps.separation.TEST_SUBSETS: tuple[tuple[tuple[str, ...], int], ...] = ((('gate1', 'test'), 1), (('gate2', 'test'), 1), (('test',), -1))#
The delayed subsets other than the whole input, and their signs in the remainder.
- class pnps.separation.Separation(bridge)[source]#
Bases:
objectThe transient-grating separation of one configuration, over its delays.
Built on a bridge with the host reduction and the exact windows; holds, once computed, the linear propagator to each save plane and the delay-free gate part, and per delay the combination being formed. At the production shape each of these is one field volume per plane (5.7 GB at 768 x 768 x 600), so three planes take about 50 GB of host memory beside the exact windows’ masks; the backend holds one run’s state at a time, as in a scan.
- Parameters:
- bridgeBridge
The configuration on solprop, built with
reduction="host"from a configuration withexact_windowsand the three-arm ("tg") layout.
- Raises:
- ConfigError
If the layout is not
"tg"or the configuration has no exact windows.- EngineError
If the bridge reduces with solprop’s statistics, which keep no field.
- gate_terms()[source]#
Return the delay-free part
N(12) - N(1) - N(2)at every save plane.Computed on the first call (three propagations) and kept. Its linear parts cancel, so it is the same combination of the propagated fields.
- Returns:
- list of numpy.ndarray
One
(n, n, nt)complex128 field per save position, the separation’s own: do not modify.
- point(tau)[source]#
Separate one delay point and collect each part through the exact discs.
- Parameters:
- taufloat
The delay in s.
- Returns:
- dict of numpy.ndarray
The records of
pnps.simulate.run_delay_point()that a scan file holds, for the transient-grating fieldN_TG:i_omega_winandi_omega_reimagedthrough the exact discs,(nz, n_windows, nt);i_omega_fullandi_omega_beam,(nz, nt), of the signal region and the whole beam;lap_lost,(nt,), ofN_TG’s beam spectrum; andz. Beside them,i_omega_win_<part>andi_omega_reimaged_<part>for each ofPARTS, andenergy_winandenergy_win_<part>,(nz, n_windows), the energy each window collects, J. All spectra are in the units ofpnps.simulate.run_delay_point().
- Raises:
- DelayError
If
tauis not a scalar.- ConfigError
If light that wraps the time window could act at the delay (
pnps.absorber.wrap_coupling()).
- pnps.separation.part_trace_names(n_windows, part)[source]#
Return the dataset names of one part’s window traces.
The transient grating fills the usual
pnps.io_h5.trace_names(); each further part (PARTS) puts its name after the window’s:Iω_win_2_remainderandIω_win_2_remainder_reimaged.- Parameters:
- n_windowsint
Number of collection windows, >= 1.
- partstr
One of
PARTS.
- Returns:
- list of str
2 * n_windowsnames: for each window, the collected trace followed by its re-imaged partner.
- Raises:
- ConfigError
If
partis not one ofPARTS.
Examples
>>> part_trace_names(2, "remainder") ['Iω_win_remainder', 'Iω_win_remainder_reimaged', 'Iω_win_2_remainder', 'Iω_win_2_remainder_reimaged']