Skip to content
gallamine edited this page Mar 12, 2012 · 3 revisions

The main propagation program is: photon_sim_r4.m

Start reading that file for information. It calls mc_func_r6 which propagates the photons in batches of num_photons. The simulation will propagate num_photons photons num_sims times. For instance, in order to simulate 1 billion photons, you should set num_photons to 1,000,000 and num_sims to 1,000 (1e6 * 1e3 = 1e9).

Execution Flags

  • sendEmail = 'true'; % Send email at start and stop of simulation

When this is set to true, the code on lines 336 - 371 of mc_sim_r4.m will execute. It will send an email to the address at mail, using the password stored in password.m (line 356, load password) once the simulation has finished. It's too hard to use. Give up.

  • ftpData = 'false'; % FTP data back to FTP server at conclusion of simulation

When set to true, the code on lines 326 - 334 of mc_sim_r4.m will execute. This will tar up the folder in foldername into filename then FTP that file to a server of choice. See saveDataFTP.m

  • saveOutput = 'true'; % Save the output data to a folder

If true, code on lines 137 - 145 and 242 - 244 will execute, saving copies of the output data from each iteration of the propagation code to the harddrive. You basically will want to do this every time, unless you change the code to evaluate receivers inline with the propagation (effectively combining mc_sim_r4.m and standaloneReceiver.m).

Simulation Variables

  • attenuationLength

Used in ultimately setting receiver_z, which is receiver_z = attenuationLength/c; , where c is the attenuation coefficient of the water (in units of 1/m)

Clone this wiki locally