satsim.geometry package

Submodules

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:
  • observerobject, Skyfield object

  • object_aobject, Skyfield object

  • object_bobject, Skyfield object

  • tTime, 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:
  • observerobject, Skyfield object

  • object_aobject, Skyfield object

  • rafloat, right ascension in degrees

  • decfloat, declination in degrees

  • tTime, 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:
  • latstring or float, latitude in degrees

  • lonstring or float, longitude in degrees

  • altfloat, altitude in km

Returns:

A Topos Skyfield object on the planet Earth

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

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

Parameters:
  • rafloat, right ascension in degrees

  • decfloat, declination in degrees

  • rollfloat, 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:
  • xfloat, x coordinate

  • yfloat, y coordinate

  • zfloat, 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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • y_fovfloat, y fov in degrees

  • x_fovfloat, x fov in degrees

  • observerobject, the observer as a Skyfield object

  • trackobject, the target to rate track as a Skyfield object

  • satelliteslist, list of targets to calculate to pixel coordinates

  • brightnessesfloat, list of brightnesses of each target in Mv

  • t0Time, Skyfield Time representing the track start time

  • ttlist, list of Skyfield Time representing observation times

  • rotfloat, rotation of the focal plane in degrees

  • pad_multfloat, padding multiplier (unused)

  • track_typestring, rate or sidereal

  • offsetfloat, array specifying [row, col] offset in pixels

  • flipudboolean, flip array in up/down direction

  • fliplrboolean, flip array in left/right direction

  • azfloat, azimuth in degrees for fixed tracking

  • elfloat, 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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • wcslist, list of AstroPy world coordinate system object used to transform world to pixel coordinates at t_start

  • observerobject, the observer as a Skyfield object

  • targetslist, list of objects to test if in bounds

  • t0Time, Skyfield Time representing the track start time

  • ttlist, list of Skyfield Time representing observation times

  • originstring, corner or center

  • offsetfloat, array specifying [row, col] offset in pixels

  • flipudboolean, flip array in up/down direction

  • fliplrboolean, 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)

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

Parameters:
  • observerobject, observer as a Skyfield object

  • targetobject, target as a Skyfield object

  • tobject, skyfield time

  • deflectionboolean, enable deflection adjustment

  • aberrationboolean, enable aberration of light adjustment

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)

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

Parameters:
  • observerobject, observer as a Skyfield object

  • azfloat, azimuth

  • elfloat, elevation

  • tobject, 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.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:
  • albedofloat, The ratio of reflected light to incident light off of the object’s surface

  • distancefloat, distance to object in meters

  • radiusfloat, radius of sphere in meters

  • phase_anglefloat, the angle between observer, object, and sun in degrees

Returns:

A float, calculated visual magnitude

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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • y_fovfloat, y fov in degrees

  • x_fovfloat, x fov in degrees

  • rafloat, right ascension of origin (center or corner [0,0])

  • decfloat, declination of origin (center or corner [0,0])

  • t0Time, Skyfield Time representing the time

  • observerobject, the observer as a Skyfield object

  • targetslist, list of objects to test if in bounds

  • rotfloat, rotation of the focal plane in degrees

  • pad_multfloat, padding multiplier

  • originstring, corner or center

  • offsetfloat, 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:
  • rafloat, right ascension in degrees

  • decfloat, declination in degrees

  • dfloat, 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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • y_fovfloat, y fov in degrees

  • x_fovfloat, x fov in degrees

  • observerobject, the observer as a Skyfield object

  • ttlist, list of Skyfield Time representing observation times

  • rotfloat, rotation of the focal plane in degrees

  • azfloat, azimuth

  • elfloat, 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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • y_fovfloat, y fov in degrees

  • x_fovfloat, x fov in degrees

  • observerobject, the observer as a Skyfield object

  • t0Time, Skyfield Time representing the track start time

  • ttlist, list of Skyfield Time representing observation times

  • rotfloat, rotation of the focal plane in degrees

  • trackobject, 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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • y_fovfloat, y fov in degrees

  • x_fovfloat, x fov in degrees

  • observerobject, the observer as a Skyfield object

  • t0Time, Skyfield Time representing the track start time

  • ttlist, list of Skyfield Time representing observation times

  • rotfloat, rotation of the focal plane in degrees

  • trackobject, 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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • y_fovfloat, y fov in degrees

  • x_fovfloat, x fov in degrees

  • rafloat, right ascension of top left corner of array, [0,0]

  • decfloat, declination of top left corner of array, [0,0]

  • rotfloat, focal plane rotation

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

  • originstring, if center, rr and cc will be defined where the line of sight is at the center of the focal plane array. default=’center’

  • flipudboolean, flip row coordinates

  • fliplrboolean, 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:
  • r0float, starting row.

  • c0float, starting column.

  • r1float, mid row.

  • c1float, mid column.

  • r2float, ending row.

  • c2float, ending column.

  • pefloat, brightness in pe/sec

  • t_startfloat, start time

  • t_endfloat, 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:
  • heightint, image height in number of pixels.

  • widthint, 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

  • pefloat, brightness in pe/sec

  • t_startfloat, start time in seconds from epoch (t=0)

  • t_endfloat, 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:
  • r0float, starting row.

  • c0float, starting column.

  • r1float, ending row.

  • c1float, ending column.

  • pefloat, brightness in pe/sec

  • t_startfloat, start time

  • t_endfloat, 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:
  • positionarray, positions in ITRF. example: [[-6045, -3490, 2500], …]

  • velocityarray, velocities in ITRF. example: [[-3.457, 6.618, 2.534], …]

  • timesarray, seconds from epoch.

  • epochTime, epoch time as Skyfield Time.

  • namestring, object name.

  • orderint, 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:
  • rafloat, right ascension in degrees

  • decfloat, declination in degrees

  • tTime, observation time as Skyfield Time

  • observerVectorFunction, Skyfield observer

  • targetVectorFunction, Skyfield target

  • dfloat, distance to target in km if target is None

  • namestring, object name

Returns:

An EarthObservation object

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:
  • heightint, image height in number of pixels.

  • widthint, image width in number of pixels.

  • y_fovfloat, vertical field of view in degrees

  • x_fovfloat, horizontal field of view in degrees

  • pe_binslist, brightness bins

  • densitylist, number of occurrences per 1 square degree for each bin

  • pad_multfloat, 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:
  • tle1string, 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:

urlslist, 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:
  • filenamestr, the image file name.

  • normalizeboolean, 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:

starlist, 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:
  • filenameint, index filename.

  • numRaZonesint, number of RA zones. default: 60

  • numDecZonesint, 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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • y_fovfloat, y fov in degrees

  • x_fovfloat, x fov in degrees

  • rafloat, right ascension of top left corner of array, [0,0]

  • decfloat, declination of top left corner of array, [0,0]

  • rotfloat, focal plane rotation

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

  • pad_multfloat, padding multiplier

  • originstring, 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_obboolean, remove stars outside pad

  • flipudboolean, flip row coordinates

  • fliplrboolean, 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_minfloat, min RA bounds

  • ra_maxfloat, max RA bounds

  • dec_minfloat, min dec bounds

  • dec_maxfloat, max dec bounds

  • rootPathstring, path to root directory. default: environment variable SATSIM_SSTR7_PATH

  • clip_min_maxboolean, 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:

bufferlist, 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_minfloat, min RA bounds

  • ra_maxfloat, max RA bounds

  • dec_minfloat, min dec bounds

  • dec_maxfloat, max dec bounds

  • zoneIndexlist, list of zones

  • numRaZonesint, number of RA zones. default: 60

  • numDecZonesint, 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:
  • heightint, height of array

  • widthint, width of width

  • rlist, list of row pixel coordinates.

  • clist, list of column pixel coordinates.

  • t_startfloat, start time in seconds from t_epoch where t_epoch=0

  • t_endfloat, end time in seconds from t_epoch where t_epoch=0

  • rotationfloat, 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_m1int, image height in number of pixels minus 1.

  • w_m1int, image width in number of pixels minus 1.

  • rlist, list of row pixel coordinates

  • clist, list of col pixel coordinates

  • tfloat, time elapsed from epoch

  • rotationfloat, 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:
  • positionarray, AstroPy position in ITRF. example: [-6045, -3490, 2500] * u.km

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

  • epochTime, epoch time

  • methodstring, 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:
  • tle1string, first line of the TLE

  • tle2string, second line of the TLE

  • epochTime, time to generate epoch state vector for two body

  • methodstring, 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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • y_ifovfloat, y ifov in degrees

  • x_ifovfloat, x ifov in degrees

  • rafloat, right ascension of origin

  • decfloat, declination of origin

  • rotfloat, focal plane rotation

  • pad_multfloat, padding multiplier

  • originstring, corner or center

  • offsetfloat, 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:
  • heightint, height in number of pixels

  • widthint, width in number of pixels

  • y_ifovfloat, y i-fov in degrees

  • x_ifovfloat, x i-fov in degrees

  • rafloat, right ascension at pixel 0,0

  • decfloat, declination of at pixel 0,0

  • rotfloat, rotation of the focal plane in degrees

Returns:

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