read_photons

Reads photon x and y positions and dt timing data into the structure.

Syntax

data = read_photons(filename)
data = read_photons(filename, range_seconds)

Description

read_photon(filename)

Reads all the photons attributes into the structure data.

read_photon(filename, range_seconds)

Reads a subset of photons data acquired within specified range.

Parameters

filename

String specifying the name of .PHOTONS file.

range_seconds

Two element vector of numeric values specifying the range of data in seconds.

Return values

data Structure holding the requested range of the data with the fields:

  • x
    Horisontal photon position
  • y
    Vertical photon position
  • dt
    Picosecond timing

Examples

Read the whole file into the memory.

>> photonscore.read_photons('gfp.photons')

ans =

  struct with fields:

     x: [59905824×1 uint16]
     y: [59905824×1 uint16]
    dt: [59905824×1 uint16]

Read the photons detected within 1.2 seconds starting from the second 3.

>> photonscore.read_photons('gfp.photons', [3 4.2])

ans =

  struct with fields:

     x: [203613×1 uint16]
     y: [203613×1 uint16]
    dt: [203613×1 uint16]