satsim.geometry package — SatSim 0.20.1 documentation

# satsim.geometry package

## Submodules

## satsim.geometry.analytic_obs module

satsim.geometry.analytic_obs.generate(ssp, obs_os_pix, astrometrics, bg_level, dc_level, rn, en)

  Generate analytical observations for a frame using precomputed RA/Dec.

  Parameters:

    - ssp – dict, SatSim configuration parameters.

    - obs_os_pix – list, list of detected observations in pixel space. Each entry must contain the keys `ra` and `dec` giving the mid-exposure position of the object.

    - astrometrics – dict, frame astrometric parameters.

    - bg_level – float, background noise level per pixel.

    - dc_level – float, dark current level per pixel.

    - rn – float, read noise standard deviation in photo-electrons.

    - en – float, electronic noise standard deviation in photo-electrons.

  Notes

  `pixel_error` is interpreted as the standard deviation of the positional error in pixel units. The error is applied isotropically in the focal plane so that the per-axis standard deviation is `pixel_error / sqrt(2)`.

  Returns:

    list of observations in the JSON output format.

## satsim.geometry.astrometric module

Tests for satsim.geometry.astrometric package.

class satsim.geometry.astrometric.GreatCircle(az, el, heading, velocity, t, observer)

  Bases: `object`

  A great circle propagated skyfield object.

satsim.geometry.astrometric.angle_between(observer, object_a, object_b, t)

  Calculate the angle between observer to object_a and observer and object_b at time t. Angle is returned in degrees.

  Parameters:

    - observer – object, Skyfield object

    - object_a – object, Skyfield object

    - object_b – object, Skyfield object

    - t – Time, Skyfield Time

  Returns:

    A float, angle in degrees

satsim.geometry.astrometric.angle_from_los(observer, object_a, ra, dec, t)

  Calculate the angle between observer to object_a and observer to a line of sight in ra and dec. Angle is returned in degrees.

  Parameters:

    - observer – object, Skyfield object

    - object_a – object, Skyfield object

    - ra – float, right ascension in degrees

    - dec – float, declination in degrees

    - t – Time, Skyfield Time

  Returns:

    A float, angle in degrees

satsim.geometry.astrometric.apparent(p, deflection=False, aberration=True)

  Compute an `Apparent` position for this body. This applies two effects to the position that arise from relativity and shift slightly where the other body will appear in the sky: the deflection that the image will experience if its light passes close to large masses in the Solar System, and the aberration of light caused by the observer’s own velocity. Note: This algorithm is copied from skyfield/positionlib.py and modified to disable deflection and aberration calculation.

satsim.geometry.astrometric.create_topocentric(lat, lon, alt=0)

  Create a Skyfield topocentric object which represents the location of a place on the planet Earth.

  Parameters:

    - lat – string or float, latitude in degrees

    - lon – string or float, longitude in degrees

    - alt – float, altitude in km

  Returns:

    A Topos Skyfield object on the planet Earth

satsim.geometry.astrometric.distance_between(object_a, object_b, t)

  Calculate the distance between object_a and object_b at time t.

  Parameters:

    - object_a – object, Skyfield object

    - object_b – object, Skyfield object

    - t – Time, Skyfield Time

  Returns:

    A float, distance in km

satsim.geometry.astrometric.eci_to_ecr(time, ra, dec, roll=0)

  Covert an Earth centered fixed sky coordinates to Earth centered rotating.

  Parameters:

    - ra – float, right ascension in degrees

    - dec – float, declination in degrees

    - roll – float, field rotation (ignored)

  Returns:

    A float, ra, dec and roll in degrees

satsim.geometry.astrometric.eci_to_radec(x, y, z)

  Covert ECI coordinates to ra, dec, and distance.

  Parameters:

    - x – float, x coordinate

    - y – float, y coordinate

    - z – float, z coordinate

  Returns:

    A float, ra, dec and distance in degrees

satsim.geometry.astrometric.gen_track(height, width, y_fov, x_fov, observer, track, satellites, brightnesses, t0, tt, rot=0, pad_mult=0, track_type='rate', offset=[0, 0], flipud=False, fliplr=False, az=None, el=None)

  Generates a list of pixel coordinates from the observing focal plane array to each satellite in the list, satellites. Track mode can be either rate or sidereal.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - y_fov – float, y fov in degrees

    - x_fov – float, x fov in degrees

    - observer – object, the observer as a Skyfield object

    - track – object, the target to rate track as a Skyfield object

    - satellites – list, list of targets to calculate to pixel coordinates

    - brightnesses – float, list of brightnesses of each target in Mv

    - t0 – Time, Skyfield Time representing the track start time

    - tt – list, list of Skyfield Time representing observation times

    - rot – float, rotation of the focal plane in degrees

    - pad_mult – float, padding multiplier (unused)

    - track_type – string, rate or sidereal

    - offset – float, array specifying [row, col] offset in pixels

    - flipud – boolean, flip array in up/down direction

    - fliplr – boolean, flip array in left/right direction

    - az – float, azimuth in degrees for fixed tracking

    - el – float, elevation in degrees for fixed tracking

  Returns:

    rr: list, list of row coordinates for each target at each time cc: list, list of column coordinates for each target at each time dr: float, star motion along the rows in pixel per second dc: float, star motion along the columns in pixel per second b: float, list of brightnesses of each target in Mv

  Return type:

    A tuple, containing

satsim.geometry.astrometric.gen_track_from_wcs(height, width, wcs, observer, targets, t0, tt, origin='center', offset=[0, 0], flipud=False, fliplr=False)

  Generates a list of pixel coordinates on the observing focal plane array for each object in the list, target. Target is tracked based on wcs0 and wcs1.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - wcs – list, list of AstroPy world coordinate system object used to transform world to pixel coordinates at t_start

    - observer – object, the observer as a Skyfield object

    - targets – list, list of objects to test if in bounds

    - t0 – Time, Skyfield Time representing the track start time

    - tt – list, list of Skyfield Time representing observation times

    - origin – string, corner or center

    - offset – float, array specifying [row, col] offset in pixels

    - flipud – boolean, flip array in up/down direction

    - fliplr – boolean, flip array in left/right direction

  Returns:

    rr: list, list of row coordinates for each target at each time cc: list, list of column coordinates for each target at each time dr: float, star motion along the rows in pixel per second dc: float, star motion along the columns in pixel per second

  Return type:

    A tuple, containing

satsim.geometry.astrometric.get_los(observer, target, t, deflection=False, aberration=True, stellar_aberration=False)

  Get the apparent line of sight vector from an observer and target in right ascension (RA) and declination (Dec).

  Parameters:

    - observer – object, observer as a Skyfield object

    - target – object, target as a Skyfield object

    - t – object, skyfield time

    - deflection – boolean, enable deflection adjustment

    - aberration – boolean, enable aberration of light adjustment for the target

    - stellar_aberration – boolean, enable stellar aberration adjustment for a star

  Returns:

    ra: right ascension in degrees dec: declination in degrees d: distance between observer and target in km az: azimuth angle in degrees el: elevation angle in degrees icrf_los: LOS as skyfield ICRF object

  Return type:

    A tuple, containing

satsim.geometry.astrometric.get_los_azel(observer, az, el, t, deflection=False, aberration=True, stellar_aberration=False)

  Get the apparent line of sight vector from an observer based on topocentric az and el.

  Parameters:

    - observer – object, observer as a Skyfield object

    - az – float, azimuth

    - el – float, elevation

    - t – object, skyfield time

  Returns:

    ra: right ascension in degrees dec: declination in degrees d: distance between observer and target in km az: azimuth angle in degrees el: elevation angle in degrees icrf_los: LOS as skyfield ICRF object

  Return type:

    A tuple, containing

satsim.geometry.astrometric.load_earth()

  Loads a Skyfield Earth object using the planetary and lunar ephemeris, DE 421. The Earth object is loaded once and cached as a singleton in the variable SATSIM_EARTH.

  Returns:

    The planet Earth Skyfield object

satsim.geometry.astrometric.load_moon()

  Loads a Skyfield Moon object using the planetary and lunar ephemeris, DE 421. The Mon object is loaded once and cached as a singleton in the variable SATSIM_MOON.

  Returns:

    The Moon Skyfield object

satsim.geometry.astrometric.load_sun()

  Loads a Skyfield Sun object using the planetary and lunar ephemeris, DE 421. The Sun object is loaded once and cached as a singleton in the variable SATSIM_SUN.

  Returns:

    The Sun Skyfield object

satsim.geometry.astrometric.query_by_los(height, width, y_fov, x_fov, ra, dec, t0, observer, targets=[], rot=0, pad_mult=0, origin='center', offset=[0, 0])

  Return objects that are within the minimum and maximum RA and declination bounds of the observer’s focal plan array with padding, pad_mult.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - y_fov – float, y fov in degrees

    - x_fov – float, x fov in degrees

    - ra – float, right ascension of origin (center or corner [0,0])

    - dec – float, declination of origin (center or corner [0,0])

    - t0 – Time, Skyfield Time representing the time

    - observer – object, the observer as a Skyfield object

    - targets – list, list of objects to test if in bounds

    - rot – float, rotation of the focal plane in degrees

    - pad_mult – float, padding multiplier

    - origin – string, corner or center

    - offset – float, array specifying [row, col] offset in pixels

  Returns:

    visible: list, list of Skyfield objects that are in bounds idx: indices of visible objects in targets

  Return type:

    A tuple, containing

satsim.geometry.astrometric.radec_to_eci(ra, dec, d=0)

  Covert ra, dec, and distance to ECI coordinates.

  Parameters:

    - ra – float, right ascension in degrees

    - dec – float, declination in degrees

    - d – float, distance

  Returns:

    A float, x, y, and z coordinates

satsim.geometry.astrometric.wcs_from_observer_fixed(height, width, y_fov, x_fov, observer, tt, rot, az, el)

  Calculate the world coordinate system (WCS) transform from the observer at a fixed pointing position based on azimuth and elevation.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - y_fov – float, y fov in degrees

    - x_fov – float, x fov in degrees

    - observer – object, the observer as a Skyfield object

    - tt – list, list of Skyfield Time representing observation times

    - rot – float, rotation of the focal plane in degrees

    - az – float, azimuth

    - el – float, elevation

  Returns:

    WCS transform

  Return type:

    A object

satsim.geometry.astrometric.wcs_from_observer_rate(height, width, y_fov, x_fov, observer, t0, tt, rot, track)

  Calculate the world coordinate system (WCS) transform from the observer at times tt while rate tracking the object, track.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - y_fov – float, y fov in degrees

    - x_fov – float, x fov in degrees

    - observer – object, the observer as a Skyfield object

    - t0 – Time, Skyfield Time representing the track start time

    - tt – list, list of Skyfield Time representing observation times

    - rot – float, rotation of the focal plane in degrees

    - track – object, the target to rate track as a Skyfield object

  Returns:

    WCS transform

  Return type:

    A object

satsim.geometry.astrometric.wcs_from_observer_sidereal(height, width, y_fov, x_fov, observer, t0, tt, rot, track)

  Calculate the world coordinate system (WCS) transform from the observer at times tt while sidereal tracking the object, track.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - y_fov – float, y fov in degrees

    - x_fov – float, x fov in degrees

    - observer – object, the observer as a Skyfield object

    - t0 – Time, Skyfield Time representing the track start time

    - tt – list, list of Skyfield Time representing observation times

    - rot – float, rotation of the focal plane in degrees

    - track – object, the target to rate track as a Skyfield object

  Returns:

    WCS transform

  Return type:

    A object

## satsim.geometry.csvsc module

satsim.geometry.csvsc.query_by_los(height, width, y_fov, x_fov, ra, dec, rot=0, rootPath='hip_main.txt', origin='center', flipud=False, fliplr=False)

  Query the catalog based on focal plane parameters and ra and dec line of sight vector. Line of sight vector is defined as the top left corner of the focal plane array.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - y_fov – float, y fov in degrees

    - x_fov – float, x fov in degrees

    - ra – float, right ascension of top left corner of array, [0,0]

    - dec – float, declination of top left corner of array, [0,0]

    - rot – float, focal plane rotation

    - rootPath – path to root directory. default: “hip_main.txt”

    - origin – string, if center, rr and cc will be defined where the line of sight is at the center of the focal plane array. default=’center’

    - flipud – boolean, flip row coordinates

    - fliplr – boolean, flip column coordinates

  Returns:

    rr: list, list of row pixel locations cc: list, list of column pixel locations mv: list, list of visual magnitudes rra: list, list of RA positions in degrees ddec: list, list of declination positions in degrees

  Return type:

    A tuple, containing

## satsim.geometry.draw module

satsim.geometry.draw.gen_curve_from_points(r0, c0, r1, c1, r2, c2, pe, t_start, t_end)

  Generates a bezier curve in pixel coordinates based on a starting point at t_start, an ending point at t_end, and a mid point at (t_start + t_end) / 2. Counts, pe, is spread evenly across each pixel. Typically used to inject a moving target onto an oversampled image.

  Parameters:

    - r0 – float, starting row.

    - c0 – float, starting column.

    - r1 – float, mid row.

    - c1 – float, mid column.

    - r2 – float, ending row.

    - c2 – float, ending column.

    - pe – float, brightness in pe/sec

    - t_start – float, start time

    - t_end – float, end time

  Returns:

    rr: list, list of row pixel locations cc: list, list of column pixel locations pe: list, list of counts (e.g. photoelectrons) t: list, list of start and stop times. length is +1 larger than rr, cc, and pe.

  Return type:

    A tuple, containing

satsim.geometry.draw.gen_line(height, width, origin, velocity, pe, t_start, t_end)

  Generates a line segment in pixel coordinates based on a starting point (t = 0), velocity, start time, and end time. Counts, pe, is spread evenly across each pixel. Typically used to inject a moving target onto an oversampled image.

  Examples:

      (rr, cc, pe, t) = gen_line(5120, 5120, [.5,.5], [10,5], 1000, 1.0, 1.5)

  Parameters:

    - height – int, image height in number of pixels.

    - width – int, image width in number of pixels.

    - origin – [float, float], normalized starting point on image in [row,col] where [0,0] represents the top left corner and [1,1] the bottom right corner

    - velocity – [float,float], velocity in pixel/sec in [row,col] order

    - pe – float, brightness in pe/sec

    - t_start – float, start time in seconds from epoch (t=0)

    - t_end – float, end time in seconds from epoch (t=0)

  Returns:

    rr: list, list of row pixel locations cc: list, list of column pixel locations pe: list, list of counts (e.g. photoelectrons) t: list, list of start and stop times. length is +1 larger than rr, cc, and pe.

  Return type:

    A tuple, containing

satsim.geometry.draw.gen_line_from_endpoints(r0, c0, r1, c1, pe, t_start, t_end)

  Generates a line segment in pixel coordinates based on a starting point at t_start and an ending point at t_end. Counts, pe, is spread evenly across each pixel. Typically used to inject a moving target onto an oversampled image.

  Parameters:

    - r0 – float, starting row.

    - c0 – float, starting column.

    - r1 – float, ending row.

    - c1 – float, ending column.

    - pe – float, brightness in pe/sec

    - t_start – float, start time

    - t_end – float, end time

  Returns:

    rr: list, list of row pixel locations cc: list, list of column pixel locations pe: list, list of counts (e.g. photoelectrons) t: list, list of start and stop times. length is +1 larger than rr, cc, and pe.

  Return type:

    A tuple, containing

## satsim.geometry.ephemeris module

class satsim.geometry.ephemeris.EphemerisObject(positions, velocities, times, epoch, name='EphemerisObject', order=3)

  Bases: `VectorFunction`

  Skyfield Ephemeris type

  center = 399

satsim.geometry.ephemeris.create_ephemeris_object(positions, velocities, times, epoch, name='EphemerisObject', order=3)

  Create a EphemerisObject object centered about the planet Earth.

  Parameters:

    - position – array, positions in ITRF. example: [[-6045, -3490, 2500], …]

    - velocity – array, velocities in ITRF. example: [[-3.457, 6.618, 2.534], …]

    - times – array, seconds from epoch.

    - epoch – Time, epoch time as Skyfield Time.

    - name – string, object name.

    - order – int, Lagrange interpolation order.

  Returns:

    A EphemerisObject Skyfield object centered about the planet Earth.

## satsim.geometry.observation module

class satsim.geometry.observation.EarthObservation(ra, dec, t, observer, target, d=<Quantity 25000. km>, name='EarthObservation')

  Bases: `VectorFunction`

  EarthObservation type

satsim.geometry.observation.create_observation(ra, dec, t, observer, target, d=None, name='EarthObservation')

  Creates an EarthObservation object.

  Parameters:

    - ra – float, right ascension in degrees

    - dec – float, declination in degrees

    - t – Time, observation time as Skyfield Time

    - observer – VectorFunction, Skyfield observer

    - target – VectorFunction, Skyfield target

    - d – float, distance to target in km if target is None

    - name – string, object name

  Returns:

    An EarthObservation object

## satsim.geometry.photometric module

satsim.geometry.photometric.lambertian_sphere_model_to_mv(observer, target, model, time)

  Calculates the phase angle between the observer, target, and sun.

  Parameters:

    - observer – object, observer as a Skyfield object

    - target – object, target as a Skyfield object

    - sun – object, Skyfield sun object

    - time – object, Skyfield time

  Returns:

    A float, the phase angle in degrees

satsim.geometry.photometric.lambertian_sphere_to_mv(albedo, distance, radius, phase_angle)

  Applies lambertian sphere approximation to convert target brightness to visual magnitudes based on sun brightness of -26.74.

  Parameters:

    - albedo – float, The ratio of reflected light to incident light off of the object’s surface

    - distance – float, distance to object in meters

    - radius – float, radius of sphere in meters

    - phase_angle – float, the angle between observer, object, and sun in degrees

  Returns:

    A float, calculated visual magnitude

satsim.geometry.photometric.model_to_mv(observer, target, model, time)

  Calculates the phase angle between the observer, target, and sun.

  Parameters:

    - observer – object, observer as a Skyfield object

    - target – object, target as a Skyfield object

    - time – object, Skyfield time

  Returns:

    A float, the phase angle in degrees

## satsim.geometry.random module

satsim.geometry.random.gen_random_points(height, width, y_fov, x_fov, pe_bins, density, pad_mult=1)

  Generates random points in pixel coordinates of random brightnesses based on density bins. Typically used to inject a stationary target such as stars onto an oversampled image.

  Examples:

      (rr, cc, pe) = gen_random_points(5120, 5120, 2, 2, [200,100,10], [30,50])

  Parameters:

    - height – int, image height in number of pixels.

    - width – int, image width in number of pixels.

    - y_fov – float, vertical field of view in degrees

    - x_fov – float, horizontal field of view in degrees

    - pe_bins – list, brightness bins

    - density – list, number of occurrences per 1 square degree for each bin

    - pad_mult – float, pad multiplier to add to each side of image, for example, 2x pad will add increase the size of array to 2 * y_fov and 2 * x_fov to all four sides; for a total area equal to (5 * y_fov) * (5 * x_fov)

  Returns:

    rr: list, numpy list of row pixel locations cc: list, numpy list of col pixel locations pe: list, numpy list of pe counts

  Return type:

    A tuple, containing

## satsim.geometry.sgp4 module

satsim.geometry.sgp4.create_sgp4(tle1, tle2)

  Create a Skyfield EarthSatellite object centered about the planet Earth using a two-line element (TLE) set.

  Parameters:

    - tle1 – string, first line of the TLE

    - tle2 – ‘string’, second line of the TLE

  Returns:

    A EarthSatellite Skyfield object centered about the planet Earth

satsim.geometry.sgp4.load_tle(urls)

  Loads a list of URLs containing a list of two-line element (TLE) sets. TLE is a data format encoding a list of orbital elements of an Earth-orbiting object for a given point in time, the epoch.

  Parameters:

    urls – list, a list of strings

  Returns:

    A list of Skyfield EarthSatellites

## satsim.geometry.sprite module

satsim.geometry.sprite.load_sprite_from_file(filename, normalize=True, dtype=tf.float32)

  Load an image or sprite from file based on filename extension. Supported formats: FITS

  Parameters:

    - filename – str, the image file name.

    - normalize – boolean, normalize the sprite to 1. Default=True.

  Returns:

    A Tensor, the image, None if file type is not recognized

## satsim.geometry.sstr7 module

satsim.geometry.sstr7.get_star_mv(mv)

  Gets the best visual magnitude available to be used for simulation.

  Parameters:

    star – list, list of star magnitudes, see read_star

  Returns:

    A float, the visual magnitude

satsim.geometry.sstr7.load_index(filename, numRaZones=60, numDecZones=1800)

  Map SSTRC index file entries to index vector and RA and Dec index maps. The SSTRC index files differ from the SSTRC catalog accelerator (index) files in that the only the zone position and length are stored as binary unsigned integers in a single file.

  Parameters:

    - filename – int, index filename.

    - numRaZones – int, number of RA zones. default: 60

    - numDecZones – int, number of Dec zones. default 1800

  Returns:

    A list, list of dictionaries with zone position and length

satsim.geometry.sstr7.load_stars_for_zone(id, pos, length, bound, rootPath)

  Load stars for specified zone.

satsim.geometry.sstr7.load_zone(currentZone, rootPath)

  Load the region with the records from the SSTRC catalog data file between the beginning and ending records for the specified index entry.

satsim.geometry.sstr7.query_by_los(height, width, y_fov, x_fov, ra, dec, rot=0, rootPath='/workspace/share/sstrc7', pad_mult=0, origin='center', filter_ob=True, flipud=False, fliplr=False)

  Query the catalog based on focal plane parameters and ra and dec line of sight vector. Line of sight vector is defined as the top left corner of the focal plane array.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - y_fov – float, y fov in degrees

    - x_fov – float, x fov in degrees

    - ra – float, right ascension of top left corner of array, [0,0]

    - dec – float, declination of top left corner of array, [0,0]

    - rot – float, focal plane rotation

    - rootPath – path to root directory. default: environment variable SATSIM_SSTR7_PATH

    - pad_mult – float, padding multiplier

    - origin – string, if center, rr and cc will be defined where the line of sight is at the center of the focal plane array. default=’center’

    - filter_ob – boolean, remove stars outside pad

    - flipud – boolean, flip row coordinates

    - fliplr – boolean, flip column coordinates

  Returns:

    rr: list, list of row pixel locations cc: list, list of column pixel locations mv: list, list of visual magnitudes rra: list, list of RA positions in degrees ddec: list, list of declination positions in degrees

  Return type:

    A tuple, containing

satsim.geometry.sstr7.query_by_min_max(ra_min, ra_max, dec_min, dec_max, rootPath='/workspace/share/sstrc7', clip_min_max=True)

  Query the catalog based on focal plane parameters and minimum and maximum right ascension and declination.

  Parameters:

    - ra_min – float, min RA bounds

    - ra_max – float, max RA bounds

    - dec_min – float, min dec bounds

    - dec_max – float, max dec bounds

    - rootPath – string, path to root directory. default: environment variable SATSIM_SSTR7_PATH

    - clip_min_max – boolean, clip stars outsize of ra_min and ra_max

  Returns:

    A list, stars within the bounds of input parameters

satsim.geometry.sstr7.read_star(buffer)

  Reads a byte buffer and parses star parameters.

  Parameters:

    buffer – list, byte array of length 60 bytes

  Returns:

    A dict, the star position and magnitudes

satsim.geometry.sstr7.select_zone(ra_min, ra_max, dec_min, dec_max, zoneIndex, numRaZones=60, numDecZones=1800)

  Select a list of regions that intersect with the rectangular coordinate bounds

  Parameters:

    - ra_min – float, min RA bounds

    - ra_max – float, max RA bounds

    - dec_min – float, min dec bounds

    - dec_max – float, max dec bounds

    - zoneIndex – list, list of zones

    - numRaZones – int, number of RA zones. default: 60

    - numDecZones – int, number of Dec zones. default 1800

  Returns:

    A list, list of dictionaries with zone position and length that

      encompass the ra/dec min max

## satsim.geometry.transform module

satsim.geometry.transform.apply_wrap_around(height, width, r, c, t_start, t_end, rotation, translation, wrap_around)

  Applies discrete rotation and translation transformations to a set of input points. This has the effect of “smearing” or “streaking” the point between times t_start and t_end. The number of transforms calculated is specified by the temporal oversample factor, t_osf. The total energy is conserved.

  Parameters:

    - height – int, height of array

    - width – int, width of width

    - r – list, list of row pixel coordinates.

    - c – list, list of column pixel coordinates.

    - t_start – float, start time in seconds from t_epoch where t_epoch=0

    - t_end – float, end time in seconds from t_epoch where t_epoch=0

    - rotation – float, clockwise rotation rate in radians/sec

    - translation – ‘[float, float]’, translation rate in pixels/sec in [row,col] order

    - wrap_around – [[float,float],[float,float],[float,float]], if not None, wrap out of bounds coordinates to other side of the fpa. The boundaries are specified as 3 lists: upper and lower row bounds, left and right column bounds, and center coordinate. Useful to wrap stars.

  Returns:

    r: Tensor, new row positions with wrap around applied c: Tensor, new column positions with wrap around applied wrap_around: Tensor, new wrap around bounds

  Return type:

    A tuple

satsim.geometry.transform.rotate_and_translate(h_m1, w_m1, r, c, t, rotation, translation)

  Rotate and translate a list of input pixels locations. Typically used to transform stars to simulate image drift and rotation during sidereal and rate track.

  Examples:

      (yy, xx) = rotate_and_translate(5120, 5120, r, c, 5.0, 0.01, [10,5])

  Parameters:

    - h_m1 – int, image height in number of pixels minus 1.

    - w_m1 – int, image width in number of pixels minus 1.

    - r – list, list of row pixel coordinates

    - c – list, list of col pixel coordinates

    - t – float, time elapsed from epoch

    - rotation – float, rotation rate in radians/sec clockwise

    - translation – [float,float], translation rate in pixel/sec in [row,col] order

  Returns:

    rr: list, list of transformed row pixel locations cc: list, list of transformed col pixel locations

  Return type:

    A tuple, containing

## satsim.geometry.twobody module

class satsim.geometry.twobody.EarthTwoBodySatellite(position, velocity, epoch, name='EarthTwoBodySatellite', method='vallado')

  Bases: `VectorFunction`

  Skyfield Two-body propagator Satellite type

  center = 399

satsim.geometry.twobody.create_twobody(position, velocity, epoch, name='EarthTwoBodySatellite', method='vallado')

  Create a EarthTwoBodySatellite object centered about the planet Earth initialized with a two-line element (TLE) set at epoch.

  Parameters:

    - position – array, AstroPy position in ITRF. example: [-6045, -3490, 2500] * u.km

    - velocity – array, AstroPy velocity in ITRF. example: [-3.457, 6.618, 2.534] * u.km / u.s

    - epoch – Time, epoch time

    - method – string, two body propagator algorithm type. Valid types are: ‘vallado’ (default), ‘farnocchia’, ‘cowell`.

  Returns:

    A EarthTwoBodySatellite Skyfield object centered about the planet Earth

satsim.geometry.twobody.create_twobody_from_tle(tle1, tle2, epoch=None, method='vallado')

  Create a Skyfield EarthTwoBodySatellite object centered about the planet Earth using a two-line element (TLE) set.

  Parameters:

    - tle1 – string, first line of the TLE

    - tle2 – string, second line of the TLE

    - epoch – Time, time to generate epoch state vector for two body

    - method – string, two body propagator algorithm type. Valid types are: ‘vallado’ (default), ‘farnocchia’, ‘cowell`.

  Returns:

    A EarthTwoBodySatellite Skyfield object centered about the planet Earth

## satsim.geometry.wcs module

satsim.geometry.wcs.get_min_max_ra_dec(height, width, y_ifov, x_ifov, ra, dec, rot=0, pad_mult=0, origin='center', offset=[0, 0])

  Get the min and max RA and Dec bounds based on focal plane parameters.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - y_ifov – float, y ifov in degrees

    - x_ifov – float, x ifov in degrees

    - ra – float, right ascension of origin

    - dec – float, declination of origin

    - rot – float, focal plane rotation

    - pad_mult – float, padding multiplier

    - origin – string, corner or center

    - offset – float, array specifying [row, col] offset in pixels

  Returns:

    cmin: array, minimum ra and dec cmax: array, maximum ra and dec wcs: WCS, used to transform RA, Dec to pixel coordinates

  Return type:

    A tuple, containing

satsim.geometry.wcs.get_wcs(height, width, y_ifov, x_ifov, ra, dec, rot=0)

  Get an AstroPy world coordinate system (WCS) object used to transform RA, Dec coordinates to focal plane array pixel coordinates.

  Parameters:

    - height – int, height in number of pixels

    - width – int, width in number of pixels

    - y_ifov – float, y i-fov in degrees

    - x_ifov – float, x i-fov in degrees

    - ra – float, right ascension at pixel 0,0

    - dec – float, declination of at pixel 0,0

    - rot – float, rotation of the focal plane in degrees

  Returns:

    A WCS, used to transform RA, Dec to pixel coordinates