traverse

romanisim.cr.traverse(trail_start, trail_end, N_i=4096, N_j=4096, eps=1e-10)

Given a starting and ending pixel, returns a list of pixel coordinates (ii, jj) and their traversed path lengths. Note that the centers of pixels are treated as integers, while the borders are treated as half-integers.

Parameters:
trail_start(float, float)

The starting coordinates in (i, j) of the cosmic ray trail, in units of pix.

trail_end(float, float)

The ending coordinates in (i, j) of the cosmic ray trail, in units of pix.

N_iint

Number of pixels along i-axis of detector

N_jint

Number of pixels along j-axis of detector

epsfloat

Tiny value used for stable numerical rounding.

Returns:
iinp.ndarray[int]

i-axis positions of traversed trail, in units of pix.

jjnp.ndarray[int]

j-axis positions of traversed trail, in units of pix.

lengthsnp.ndarray[float]

Chord lengths for each traversed pixel, in units of pix.