API Reference Documentation¶
gnpy
package¶
GNPy is an open-source, community-developed library for building route planning and optimization tools in real-world mesh optical networks. It is based on the Gaussian Noise Model.
Signal propagation is implemented in core
.
Path finding and spectrum assignment is in topology
.
Various tools and auxiliary code, including the JSON I/O handling, is in
tools
.
gnpy.core
- gnpy.core.ansi_escapes
- gnpy.core.elements
Edfa
Fiber
Fused
Location
Multiband_amplifier
RamanFiber
Roadm
Transceiver
_Node
- gnpy.core.equipment
find_type_varieties()
find_type_variety()
trx_mode_params()
- gnpy.core.exceptions
ConfigurationError
DisjunctionError
EquipmentConfigError
NetworkTopologyError
ParametersError
ServiceError
SpectrumError
- gnpy.core.info
Carrier
Channel
DEFAULT_SLOT_WIDTH_STEP
Power
ReferenceCarrier
SpectralInformation
SpectralInformation._replace()
SpectralInformation.apply_attenuation_db()
SpectralInformation.apply_attenuation_lin()
SpectralInformation.apply_gain_db()
SpectralInformation.apply_gain_lin()
SpectralInformation.ase
SpectralInformation.baud_rate
SpectralInformation.carriers
SpectralInformation.channel_number
SpectralInformation.chromatic_dispersion
SpectralInformation.delta_pdb_per_channel
SpectralInformation.df
SpectralInformation.frequency
SpectralInformation.label
SpectralInformation.latency
SpectralInformation.nli
SpectralInformation.number_of_channels
SpectralInformation.pdl
SpectralInformation.pmd
SpectralInformation.powers
SpectralInformation.roll_off
SpectralInformation.signal
SpectralInformation.slot_width
SpectralInformation.tx_osnr
SpectralInformation.tx_power
carriers_to_spectral_information()
create_arbitrary_spectral_information()
create_input_spectral_information()
demuxed_spectral_information()
is_in_band()
muxed_spectral_information()
- gnpy.core.network
add_connector_loss()
add_fiber_padding()
add_inline_amplifier()
add_missing_elements_in_network()
add_missing_fiber_attributes()
add_roadm_booster()
add_roadm_preamp()
build_network()
calculate_new_length()
check_oms_single_type()
compute_band_power_deviation_and_tilt()
compute_gain_power_and_tilt_target()
compute_tilt_using_previous_and_next_spans()
design_network()
edfa_nf()
estimate_raman_gain()
estimate_srs_power_deviation()
filter_edfa_list_based_on_targets()
find_first_node()
find_last_node()
get_next_node()
get_node_restrictions()
get_oms_edge_list()
get_oms_edge_list_from_egress()
get_previous_node()
next_node_generator()
preselect_multiband_amps()
prev_node_generator()
select_edfa()
set_amplifier_voa()
set_egress_amplifier()
set_fiber_input_power()
set_one_amplifier()
set_per_degree_design_band()
set_roadm_input_powers()
set_roadm_internal_paths()
set_roadm_per_degree_targets()
set_roadm_ref_carrier()
span_loss()
split_fiber()
target_power()
- gnpy.core.parameters
EdfaOperational
EdfaParams
FiberParams
FiberParams.asdict()
FiberParams.att_in
FiberParams.con_in
FiberParams.con_out
FiberParams.dispersion
FiberParams.dispersion_slope
FiberParams.effective_area_overlap()
FiberParams.effective_area_scaling()
FiberParams.f_dispersion_ref
FiberParams.f_loss_ref
FiberParams.gamma
FiberParams.gamma_scaling()
FiberParams.latency
FiberParams.length
FiberParams.loss_coef
FiberParams.lumped_losses
FiberParams.pmd_coef
FiberParams.raman_coefficient
FiberParams.ref_frequency
FiberParams.ref_wavelength
FrequencyBand
FusedParams
MultiBandParams
NLIParams
Parameters
PumpParams
RamanGainCoefficient
RamanParams
RoadmImpairment
RoadmParams
RoadmPath
SimParams
TransceiverParams
find_band_name()
- gnpy.core.science_utils
NliSolver
NliSolver.SPM_WEIGHT
NliSolver.XPM_WEIGHT
NliSolver._approx_psi()
NliSolver._fast_generalized_psi()
NliSolver._frequency_offset_threshold()
NliSolver._generalized_psi()
NliSolver._generalized_rho_nli()
NliSolver._ggn_approx()
NliSolver._ggn_spectrally_separated()
NliSolver._gn_analytic()
NliSolver._psi()
NliSolver.compute_nli()
NliSolver.effective_length()
RamanSolver
StimulatedRamanScattering
estimate_nf_model()
raised_cosine()
- gnpy.core.utils
arrange_frequencies()
automatic_fmax()
automatic_nch()
calculate_absolute_min_or_zero()
convert_length()
db2lin()
dbm2watt()
deltaf2deltawl()
deltawl2deltaf()
find_common_range()
lin2db()
merge_amplifier_restrictions()
nice_column_str()
order_slots()
per_label_average()
power_dbm_to_psd_mw_ghz()
pretty_summary_print()
psd2powerdbm()
psd_mw_per_ghz()
replace_none()
restore_order()
round2float()
rrc()
silent_remove()
snr_sum()
transform_data()
unique_ordered()
watt2dbm()
write_csv()
gnpy.topology
- gnpy.topology.request
Disjunction
DisjunctionParams
DisjunctionParams._asdict()
DisjunctionParams._field_defaults
DisjunctionParams._fields
DisjunctionParams._make()
DisjunctionParams._replace()
DisjunctionParams.disjunction_id
DisjunctionParams.disjunctions_req
DisjunctionParams.link_diverse
DisjunctionParams.node_diverse
DisjunctionParams.relaxable
PathRequest
RequestParams
RequestParams.OSNR
RequestParams._asdict()
RequestParams._field_defaults
RequestParams._fields
RequestParams._make()
RequestParams._replace()
RequestParams.baud_rate
RequestParams.bidir
RequestParams.bit_rate
RequestParams.cost
RequestParams.destination
RequestParams.effective_freq_slot
RequestParams.equalization_offset_db
RequestParams.f_max
RequestParams.f_min
RequestParams.format
RequestParams.loose_list
RequestParams.min_spacing
RequestParams.nb_channel
RequestParams.nodes_list
RequestParams.path_bandwidth
RequestParams.penalties
RequestParams.power
RequestParams.request_id
RequestParams.roll_off
RequestParams.source
RequestParams.spacing
RequestParams.trx_mode
RequestParams.trx_type
RequestParams.tx_osnr
RequestParams.tx_power
ResultElement
_penalty_msg()
compare_reqs()
compute_constrained_path()
compute_path_dsjctn()
compute_path_with_disjunction()
compute_spectrum_slot_vs_bandwidth()
correct_json_route_list()
deduplicate_disjunctions()
explicit_path()
filter_si()
find_elements_common_range()
find_reversed_path()
is_adjacent()
isdisjoint()
ispart()
jsontocsv()
jsontoparams()
jsontopath_metric()
propagate()
propagate_and_optimize_mode()
remove_candidate()
requests_aggregation()
- gnpy.topology.spectrum_assignment
Bitmap
OMS
OMSParams
aggregate_oms_bitmap()
align_grids()
bitmap_sum()
build_oms_list()
build_path_oms_id_list()
compute_n_m()
create_oms_bitmap()
determine_slot_numbers()
find_network_freq_range()
frequency_to_n()
m_to_freq()
mvalue_to_slots()
nvalue_to_frequency()
pth_assign_spectrum()
reversed_oms()
select_candidate()
slots_to_m()
spectrum_selection()
gnpy.tools
- gnpy.tools.cli_examples
_add_common_options()
_path_result_json()
_setup_logging()
load_common_data()
path_requests_run()
show_example_data_dir()
transmission_main_example()
- gnpy.tools.convert
Eqpt
Link
Node
Roadm
_do_convert()
_format_items()
all_rows()
connect_eqpt()
convert_file()
corresp_names()
corresp_next_node()
create_east_eqpt_element()
create_roadm_element()
create_west_eqpt_element()
eqpt_connection_by_city()
eqpt_in_city_to_city()
fiber_dest_from_source()
fiber_link()
midpoint()
parse_excel()
parse_headers()
parse_row()
parse_sheet()
read_header()
read_slice()
sanity_check()
xls_to_json_data()
- gnpy.tools.json_io
Amp
Fiber
Model_dual_stage
Model_fg
Model_hybrid
Model_openroadm_booster
Model_openroadm_ila
Model_openroadm_preamp
Model_vg
RamanFiber
Roadm
SI
Span
Transceiver
_JsonThing
_check_fiber_vs_raman_fiber()
_check_one_request()
_cls_for()
_equipment_from_json()
_roadm_restrictions_sanity_check()
_spectrum_from_json()
_update_band()
_update_dual_stage()
convert_service_sheet()
disjunctions_from_json()
find_equalisation()
load_equipment()
load_initial_spectrum()
load_json()
load_network()
load_requests()
merge_equalization()
network_from_json()
network_to_json()
requests_from_json()
save_json()
save_network()
- gnpy.tools.plots
_try_city()
plot_baseline()
plot_results()
- gnpy.tools.service_sheet
Element
Request
Request_element
check_end_points()
correct_xlrd_int_to_str_reading()
correct_xls_route_list()
find_node_sugestion()
parse_excel()
parse_row()
parse_service_sheet()
read_service_sheet()