tidy3d.ContinuousWaveTimeModulation#
- class ContinuousWaveTimeModulation[source]#
Class describing modulation with a harmonic time dependence.
- Parameters:
amplitude (NonNegativeFloat = 1.0) – Real-valued maximum amplitude of the time dependence.
phase (float = 0.0) – [units = rad]. Phase shift of the time dependence.
freq0 (PositiveFloat) – [units = Hz]. Modulation frequency.
Note
\[amp\_time(t) = amplitude \cdot \ e^{i \cdot phase - 2 \pi i \cdot freq0 \cdot t}\]Note
The full space-time modulation is,
\[amp(r, t) = \Re[amp\_time(t) \cdot amp\_space(r)]\]Example
>>> cw = ContinuousWaveTimeModulation(freq0=200e12, amplitude=1, phase=0)
- __init__(**kwargs)#
Init method, includes post-init validators.
Methods
__init__
(**kwargs)Init method, includes post-init validators.
add_type_field
()Automatically place "type" field with model name in the model field dictionary.
amp_time
(time)Complex-valued source amplitude as a function of time.
construct
([_fields_set])Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
copy
(**kwargs)Copy a Tidy3dBaseModel.
dict
(*[, include, exclude, by_alias, ...])Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
dict_from_file
(fname[, group_path])Loads a dictionary containing the model from a .yaml, .json, .hdf5, or .hdf5.gz file.
dict_from_hdf5
(fname[, group_path, ...])Loads a dictionary containing the model contents from a .hdf5 file.
dict_from_hdf5_gz
(fname[, group_path, ...])Loads a dictionary containing the model contents from a .hdf5.gz file.
dict_from_json
(fname)Load dictionary of the model from a .json file.
dict_from_yaml
(fname)Load dictionary of the model from a .yaml file.
from_file
(fname[, group_path])Loads a
Tidy3dBaseModel
from .yaml, .json, .hdf5, or .hdf5.gz file.from_hdf5
(fname[, group_path, custom_decoders])Loads
Tidy3dBaseModel
instance to .hdf5 file.from_hdf5_gz
(fname[, group_path, ...])Loads
Tidy3dBaseModel
instance to .hdf5.gz file.from_json
(fname, **parse_obj_kwargs)Load a
Tidy3dBaseModel
from .json file.from_orm
(obj)from_yaml
(fname, **parse_obj_kwargs)Loads
Tidy3dBaseModel
from .yaml file.generate_docstring
()Generates a docstring for a Tidy3D mode and saves it to the __doc__ of the class.
get_sub_model
(group_path, model_dict)Get the sub model for a given group path.
get_submodels_by_hash
()Return a dictionary of this object's sub-models indexed by their hash values.
get_tuple_group_name
(index)Get the group name of a tuple element.
get_tuple_index
(key_name)Get the index into the tuple based on its group name.
help
([methods])Prints message describing the fields and methods of a
Tidy3dBaseModel
.json
(*[, include, exclude, by_alias, ...])Generate a JSON representation of the model, include and exclude arguments as per dict().
parse_file
(path, *[, content_type, ...])parse_obj
(obj)parse_raw
(b, *[, content_type, encoding, ...])plot
(times[, val, ax])Plot the complex-valued amplitude of the time-dependence.
plot_spectrum_in_frequency_range
(times, ...)Plot the complex-valued amplitude of the time-dependence.
schema
([by_alias, ref_template])schema_json
(*[, by_alias, ref_template])spectrum
(times, freqs, dt)Complex-valued spectrum as a function of frequency.
to_file
(fname)Exports
Tidy3dBaseModel
instance to .yaml, .json, or .hdf5 fileto_hdf5
(fname[, custom_encoders])Exports
Tidy3dBaseModel
instance to .hdf5 file.to_hdf5_gz
(fname[, custom_encoders])Exports
Tidy3dBaseModel
instance to .hdf5.gz file.to_json
(fname)Exports
Tidy3dBaseModel
instance to .json fileto_yaml
(fname)Exports
Tidy3dBaseModel
instance to .yaml file.tuple_to_dict
(tuple_values)How we generate a dictionary mapping new keys to tuple values for hdf5.
update_forward_refs
(**localns)Try to update ForwardRefs on fields based on this Model, globalns and localns.
updated_copy
(**kwargs)Make copy of a component instance with
**kwargs
indicating updated field values.validate
(value)Attributes
Estimated maximum modulation amplitude.
amplitude
phase
- freq0#
- property max_modulation#
Estimated maximum modulation amplitude.
- __hash__()#
Hash method.