<?xml version="1.0" encoding="UTF-8"?>
<simulation xmds-version="2">
  <testing>
    <xsil_file name="photodetector.xsil" expected="photodetector_expected.xsil" absolute_tolerance="4e-5" relative_tolerance="4e-5" />
  </testing>

  <name>photodetector</name>
  <author>Graham Dennis</author>
  <description>
    Example poissonian noise simulation
  </description>
  
  <geometry>
    <propagation_dimension> t </propagation_dimension>
  </geometry>

  <noise_vector name="noises" kind="jump" mean-rate="5.0" type="real" method="posix" seed="314 159 276">
        <components>nn</components>
  </noise_vector>
  
  <vector name="main" type="real">
    <components> N </components>
    <initialisation>
      <![CDATA[
        N = 0.0;
      ]]>
    </initialisation>
  </vector>
  
  <sequence>
    <integrate algorithm="RK4" interval="10" steps="1000">
      <samples>1000</samples>
      <operators>
        <integration_vectors>main</integration_vectors>
        <dependencies>noises</dependencies>
        <![CDATA[
          dN_dt = nn;
        ]]>
      </operators>
    </integrate>
  </sequence>
  <output format="hdf5" filename="photodetector.xsil">
      <sampling_group initial_sample="yes">
        <moments>Ndet</moments>
        <dependencies>main</dependencies>
        <![CDATA[
          Ndet = N;
        ]]>
      </sampling_group>
  </output>
</simulation>
