proc SCHEMATIC_optical_pulse_source {} {
make output -name out -origin {630 -80}
make signal_source -name xi0 -stype 2 -freq fsource -origin {330 -60}
make twenty_db_rolloff_noise -name xi2 -n_off noise_at_foff -f_off foff -origin {110 -80}
make gain -name xi1 -gain power/(fsource*Ts) -origin {540 -80}
  make_wire 460 -80 500 -80
  make_wire 590 -80 630 -80
  make_wire 190 -80 230 -80
}

proc ICON_optical_pulse_source args {


  icon_setup $args {{origin {0 0}} {orient R0} {name x} {fsource 100e6} {power 1e-3} {noise_at_foff -100} {foff 1e6}}
icon_term -type output -origin {90 -20} -name out
icon_property -origin {-90 -50} -label {$name}
icon_property -origin {-50 60} -label {fsource = $fsource Hz}
  icon_property -origin {-60 160} -type user -name name -default x
  icon_property -origin {-60 180} -type user -name fsource -default 100e6
  icon_line -90 -40 90 -40 90 50 -90 50 -90 -40
icon_property -origin {-70 40} -label optical_pulse_source
  icon_property -origin {-60 200} -type user -name power -default 1e-3
  icon_property -origin {-60 220} -type user -name noise_at_foff -default -100
icon_property -origin {-50 80} -label {power = $power W}
icon_property -origin {-50 100} -label {noise_at_foff = $noise_at_foff dBc/Hz}
icon_property -origin {80 -20} -anchor e -label out
icon_property -origin {-50 120} -label {foff = $foff Hz}
  icon_property -origin {-60 240} -type user -name foff -default 1e6


}

