input_transmission wasn't considered with loaded fields
This commit is contained in:
@@ -239,7 +239,7 @@ def setup_custom_field(params: BareParams) -> bool:
|
||||
|
||||
if params.prev_data_dir is not None:
|
||||
spec = io.load_last_spectrum(Path(params.prev_data_dir))[1]
|
||||
field_0 = np.fft.ifft(spec) * np.sqrt(params.input_transmission)
|
||||
field_0 = np.fft.ifft(spec)
|
||||
elif params.field_file is not None:
|
||||
field_data = np.load(params.field_file)
|
||||
field_interp = interp1d(
|
||||
@@ -258,6 +258,9 @@ def setup_custom_field(params: BareParams) -> bool:
|
||||
else:
|
||||
did_set = False
|
||||
|
||||
if did_set:
|
||||
field_0 = field_0 * np.sqrt(params.input_transmission)
|
||||
|
||||
return did_set, width, peak_power, energy, field_0
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ def plot_all(sim_dir: Path, limits: list[str]):
|
||||
file_name=p.parent
|
||||
/ f"{pretty_format_from_file_name(p.name)} {left} {right} {unit}",
|
||||
)
|
||||
plt.close("all")
|
||||
|
||||
|
||||
def plot_init_field_spec(
|
||||
|
||||
Reference in New Issue
Block a user