satpy.readers.gms.gms5_vissr_navigation module

GMS-5 VISSR Navigation.

Reference: GMS User Guide, Appendix E, S-VISSR Mapping.

class satpy.readers.gms.gms5_vissr_navigation.Attitude(angle_between_earth_and_sun, angle_between_sat_spin_and_z_axis, angle_between_sat_spin_and_yz_plane)

Bases: tuple

Attitude parameters.

Units: radians

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('angle_between_earth_and_sun', 'angle_between_sat_spin_and_z_axis', 'angle_between_sat_spin_and_yz_plane')
classmethod _make(iterable)

Make a new Attitude object from a sequence or iterable

_replace(**kwds)

Return a new Attitude object replacing specified fields with new values

angle_between_earth_and_sun

Alias for field number 0

angle_between_sat_spin_and_yz_plane

Alias for field number 2

angle_between_sat_spin_and_z_axis

Alias for field number 1

class satpy.readers.gms.gms5_vissr_navigation.AttitudePrediction(prediction_times, attitude)[source]

Bases: object

Attitude prediction.

Use .to_numba() to pass this object to jitted methods. This extra layer avoids usage of jitclasses and having to re-implement np.unwrap in numba.

Initialize attitude prediction.

In order to accelerate interpolation, the 2-pi periodicity of angles is unwrapped here already (that means phase jumps greater than pi are wrapped to their 2*pi complement).

Parameters:
  • prediction_times – Timestamps of predicted attitudes

  • attitude (Attitude) – Attitudes at prediction times

_unwrap_angles(attitude)[source]
to_numba()[source]

Convert to numba-compatible type.

satpy.readers.gms.gms5_vissr_navigation.EARTH_POLAR_RADIUS = 6356751.301568781

Constants taken from JMA’s Msial library.

class satpy.readers.gms.gms5_vissr_navigation.EarthEllipsoid(flattening, equatorial_radius)

Bases: tuple

Earth ellipsoid.

Parameters:
  • flattening – Ellipsoid flattening

  • equatorial_radius – Equatorial radius (meters)

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('flattening', 'equatorial_radius')
classmethod _make(iterable)

Make a new EarthEllipsoid object from a sequence or iterable

_replace(**kwds)

Return a new EarthEllipsoid object replacing specified fields with new values

equatorial_radius

Alias for field number 1

flattening

Alias for field number 0

class satpy.readers.gms.gms5_vissr_navigation.ImageNavigationParameters(static, predicted)

Bases: tuple

Navigation parameters for the entire image.

Parameters:
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('static', 'predicted')
classmethod _make(iterable)

Make a new ImageNavigationParameters object from a sequence or iterable

_replace(**kwds)

Return a new ImageNavigationParameters object replacing specified fields with new values

predicted

Alias for field number 1

static

Alias for field number 0

class satpy.readers.gms.gms5_vissr_navigation.ImageOffset(line_offset, pixel_offset)

Bases: tuple

Image offset

Parameters:
  • line_offset – Line offset from image center

  • pixel_offset – Pixel offset from image center

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('line_offset', 'pixel_offset')
classmethod _make(iterable)

Make a new ImageOffset object from a sequence or iterable

_replace(**kwds)

Return a new ImageOffset object replacing specified fields with new values

line_offset

Alias for field number 0

pixel_offset

Alias for field number 1

class satpy.readers.gms.gms5_vissr_navigation.Orbit(angles, sat_position, nutation_precession)

Bases: tuple

Orbital Parameters

Parameters:
  • angles (OrbitAngles) – Orbit angles

  • sat_position (Vector3D) – Satellite position

  • nutation_precession – Nutation and precession matrix (3x3)

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('angles', 'sat_position', 'nutation_precession')
classmethod _make(iterable)

Make a new Orbit object from a sequence or iterable

_replace(**kwds)

Return a new Orbit object replacing specified fields with new values

angles

Alias for field number 0

nutation_precession

Alias for field number 2

sat_position

Alias for field number 1

class satpy.readers.gms.gms5_vissr_navigation.OrbitAngles(greenwich_sidereal_time, declination_from_sat_to_sun, right_ascension_from_sat_to_sun)

Bases: tuple

Orbit angles.

Units: radians

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('greenwich_sidereal_time', 'declination_from_sat_to_sun', 'right_ascension_from_sat_to_sun')
classmethod _make(iterable)

Make a new OrbitAngles object from a sequence or iterable

_replace(**kwds)

Return a new OrbitAngles object replacing specified fields with new values

declination_from_sat_to_sun

Alias for field number 1

greenwich_sidereal_time

Alias for field number 0

right_ascension_from_sat_to_sun

Alias for field number 2

class satpy.readers.gms.gms5_vissr_navigation.OrbitPrediction(prediction_times, angles, sat_position, nutation_precession)[source]

Bases: object

Orbit prediction.

Use .to_numba() to pass this object to jitted methods. This extra layer avoids usage of jitclasses and having to re-implement np.unwrap in numba.

Initialize orbit prediction.

In order to accelerate interpolation, the 2-pi periodicity of angles is unwrapped here already (that means phase jumps greater than pi are wrapped to their 2*pi complement).

Parameters:
  • prediction_times – Timestamps of orbit prediction.

  • angles (OrbitAngles) – Orbit angles

  • sat_position (Vector3D) – Satellite position

  • nutation_precession – Nutation and precession matrix.

_unwrap_angles(angles)[source]
to_numba()[source]

Convert to numba-compatible type.

class satpy.readers.gms.gms5_vissr_navigation.Pixel(line, pixel)

Bases: tuple

A VISSR pixel.

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('line', 'pixel')
classmethod _make(iterable)

Make a new Pixel object from a sequence or iterable

_replace(**kwds)

Return a new Pixel object replacing specified fields with new values

line

Alias for field number 0

pixel

Alias for field number 1

class satpy.readers.gms.gms5_vissr_navigation.PixelNavigationParameters(attitude, orbit, proj_params)

Bases: tuple

Navigation parameters for a single pixel.

Parameters:
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('attitude', 'orbit', 'proj_params')
classmethod _make(iterable)

Make a new PixelNavigationParameters object from a sequence or iterable

_replace(**kwds)

Return a new PixelNavigationParameters object replacing specified fields with new values

attitude

Alias for field number 0

orbit

Alias for field number 1

proj_params

Alias for field number 2

class satpy.readers.gms.gms5_vissr_navigation.PredictedNavigationParameters(attitude, orbit)

Bases: tuple

Predictions of time-dependent navigation parameters.

They need to be evaluated for each pixel.

Parameters:
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('attitude', 'orbit')
classmethod _make(iterable)

Make a new PredictedNavigationParameters object from a sequence or iterable

_replace(**kwds)

Return a new PredictedNavigationParameters object replacing specified fields with new values

attitude

Alias for field number 0

orbit

Alias for field number 1

class satpy.readers.gms.gms5_vissr_navigation.ProjectionParameters(image_offset, scanning_angles, earth_ellipsoid)

Bases: tuple

Projection parameters.

Parameters:
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('image_offset', 'scanning_angles', 'earth_ellipsoid')
classmethod _make(iterable)

Make a new ProjectionParameters object from a sequence or iterable

_replace(**kwds)

Return a new ProjectionParameters object replacing specified fields with new values

earth_ellipsoid

Alias for field number 2

image_offset

Alias for field number 0

scanning_angles

Alias for field number 1

class satpy.readers.gms.gms5_vissr_navigation.Satpos(x, y, z)

Bases: tuple

A 3D vector.

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('x', 'y', 'z')
classmethod _make(iterable)

Make a new Satpos object from a sequence or iterable

_replace(**kwds)

Return a new Satpos object replacing specified fields with new values

x

Alias for field number 0

y

Alias for field number 1

z

Alias for field number 2

class satpy.readers.gms.gms5_vissr_navigation.ScanningAngles(stepping_angle, sampling_angle, misalignment)

Bases: tuple

Scanning angles

Parameters:
  • stepping_angle – Scanning angle along line (rad)

  • sampling_angle – Scanning angle along pixel (rad)

  • misalignment – Misalignment matrix (3x3)

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('stepping_angle', 'sampling_angle', 'misalignment')
classmethod _make(iterable)

Make a new ScanningAngles object from a sequence or iterable

_replace(**kwds)

Return a new ScanningAngles object replacing specified fields with new values

misalignment

Alias for field number 2

sampling_angle

Alias for field number 1

stepping_angle

Alias for field number 0

class satpy.readers.gms.gms5_vissr_navigation.ScanningParameters(start_time_of_scan, spinning_rate, num_sensors, sampling_angle)

Bases: tuple

Create new instance of ScanningParameters(start_time_of_scan, spinning_rate, num_sensors, sampling_angle)

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('start_time_of_scan', 'spinning_rate', 'num_sensors', 'sampling_angle')
classmethod _make(iterable)

Make a new ScanningParameters object from a sequence or iterable

_replace(**kwds)

Return a new ScanningParameters object replacing specified fields with new values

num_sensors

Alias for field number 2

sampling_angle

Alias for field number 3

spinning_rate

Alias for field number 1

start_time_of_scan

Alias for field number 0

class satpy.readers.gms.gms5_vissr_navigation.StaticNavigationParameters(proj_params, scan_params)

Bases: tuple

Navigation parameters which are constant for the entire scan.

Parameters:
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('proj_params', 'scan_params')
classmethod _make(iterable)

Make a new StaticNavigationParameters object from a sequence or iterable

_replace(**kwds)

Return a new StaticNavigationParameters object replacing specified fields with new values

proj_params

Alias for field number 0

scan_params

Alias for field number 1

class satpy.readers.gms.gms5_vissr_navigation.Vector2D(x, y)

Bases: tuple

A 2D vector.

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('x', 'y')
classmethod _make(iterable)

Make a new Vector2D object from a sequence or iterable

_replace(**kwds)

Return a new Vector2D object replacing specified fields with new values

x

Alias for field number 0

y

Alias for field number 1

class satpy.readers.gms.gms5_vissr_navigation.Vector3D(x, y, z)

Bases: tuple

A 3D vector.

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('x', 'y', 'z')
classmethod _make(iterable)

Make a new Vector3D object from a sequence or iterable

_replace(**kwds)

Return a new Vector3D object replacing specified fields with new values

x

Alias for field number 0

y

Alias for field number 1

z

Alias for field number 2

class satpy.readers.gms.gms5_vissr_navigation._AttitudePrediction(prediction_times, attitude)

Bases: tuple

Create new instance of _AttitudePrediction(prediction_times, attitude)

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('prediction_times', 'attitude')
classmethod _make(iterable)

Make a new _AttitudePrediction object from a sequence or iterable

_replace(**kwds)

Return a new _AttitudePrediction object replacing specified fields with new values

attitude

Alias for field number 1

prediction_times

Alias for field number 0

class satpy.readers.gms.gms5_vissr_navigation._OrbitPrediction(prediction_times, angles, sat_position, nutation_precession)

Bases: tuple

Create new instance of _OrbitPrediction(prediction_times, angles, sat_position, nutation_precession)

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('prediction_times', 'angles', 'sat_position', 'nutation_precession')
classmethod _make(iterable)

Make a new _OrbitPrediction object from a sequence or iterable

_replace(**kwds)

Return a new _OrbitPrediction object replacing specified fields with new values

angles

Alias for field number 1

nutation_precession

Alias for field number 3

prediction_times

Alias for field number 0

sat_position

Alias for field number 2

satpy.readers.gms.gms5_vissr_navigation._correct_nutation_precession(vector, nutation_precession)[source]
satpy.readers.gms.gms5_vissr_navigation._find_enclosing_index(x, x_sample)[source]

Find where x_sample encloses x.

satpy.readers.gms.gms5_vissr_navigation._get_abc_helper(view_vector, sat_pos, ellipsoid)[source]

Get a,b,c helper variables.

Reference: Appendix E, Equation (26) in the GMS user guide.

satpy.readers.gms.gms5_vissr_navigation._get_distance_to_intersection(view_vector, sat_pos, ellipsoid)[source]

Get distance to intersection with the earth.

If the instrument is pointing towards the earth, there will be two intersections with the surface. Choose the one on the instrument-facing side of the earth.

satpy.readers.gms.gms5_vissr_navigation._get_distances_to_intersections(view_vector, sat_pos, ellipsoid)[source]

Get distances to intersections with the earth’s surface.

Returns:

Distances to two intersections with the surface.

satpy.readers.gms.gms5_vissr_navigation._get_earth_fixed_coords(point, unit_vector_x, unit_vector_y, unit_vector_z)[source]
satpy.readers.gms.gms5_vissr_navigation._get_lons_lats_numba(lines_2d, pixels_2d, nav_params)[source]
satpy.readers.gms.gms5_vissr_navigation._get_map_blocks_kwargs(chunks)[source]
satpy.readers.gms.gms5_vissr_navigation._get_pixel_navigation_parameters(point, im_nav_params)[source]
satpy.readers.gms.gms5_vissr_navigation._get_relative_observation_time(point, scan_params)[source]
satpy.readers.gms.gms5_vissr_navigation._get_satellite_unit_vector_x(unit_vector_z, attitude, orbit)[source]
satpy.readers.gms.gms5_vissr_navigation._get_satellite_unit_vector_y(unit_vector_x, unit_vector_z)[source]
satpy.readers.gms.gms5_vissr_navigation._get_satellite_unit_vector_z(attitude, orbit)[source]
satpy.readers.gms.gms5_vissr_navigation._get_satellite_z_axis_1950(angle_between_sat_spin_and_z_axis, angle_between_sat_spin_and_yz_plane)[source]

Get satellite z-axis (spin) in mean of 1950 coordinates.

satpy.readers.gms.gms5_vissr_navigation._get_unit_vector_x(sat_sun_vec, unit_vector_z, angle_between_earth_and_sun)[source]
satpy.readers.gms.gms5_vissr_navigation._get_uz_cross_satsun(unit_vector_z, sat_sun_vec)[source]
satpy.readers.gms.gms5_vissr_navigation._get_vector_from_satellite_to_sun(declination_from_sat_to_sun, right_ascension_from_sat_to_sun)[source]
satpy.readers.gms.gms5_vissr_navigation._interpolate(x, x_sample, y_sample)[source]
satpy.readers.gms.gms5_vissr_navigation._interpolate_nearest(x, x_sample, y_sample)[source]
satpy.readers.gms.gms5_vissr_navigation._interpolate_orbit_angles(observation_time, orbit_prediction)[source]
satpy.readers.gms.gms5_vissr_navigation._interpolate_sat_position(observation_time, orbit_prediction)[source]
satpy.readers.gms.gms5_vissr_navigation._make_nav_params_numba_compatible(nav_params)[source]
satpy.readers.gms.gms5_vissr_navigation._rotate_to_greenwich(vector, greenwich_sidereal_time)[source]
satpy.readers.gms.gms5_vissr_navigation._wrap_2pi(values)[source]

Wrap values to interval [-pi, pi].

Source: https://stackoverflow.com/a/15927914/5703449

satpy.readers.gms.gms5_vissr_navigation.cross_product(a, b)[source]

Compute vector product a x b.

satpy.readers.gms.gms5_vissr_navigation.get_lon_lat(pixel, nav_params)[source]

Get longitude and latitude coordinates for a given image pixel.

Parameters:
Returns:

Longitude and latitude in degrees.

satpy.readers.gms.gms5_vissr_navigation.get_lons_lats(lines, pixels, nav_params)[source]

Compute lon/lat coordinates given VISSR image coordinates.

Parameters:
  • lines – VISSR image lines

  • pixels – VISSR image pixels

  • nav_params – Image navigation parameters

satpy.readers.gms.gms5_vissr_navigation.get_observation_time(point, scan_params)[source]

Calculate observation time of a VISSR pixel.

satpy.readers.gms.gms5_vissr_navigation.interpolate_angles(x, x_sample, y_sample)[source]

Linear interpolation of angles.

Requires 2-pi periodicity to be unwrapped before (for performance reasons). Interpolated angles are wrapped back to [-pi, pi] to restore periodicity.

satpy.readers.gms.gms5_vissr_navigation.interpolate_attitude_prediction(attitude_prediction, observation_time)[source]

Interpolate attitude prediction at given observation time.

satpy.readers.gms.gms5_vissr_navigation.interpolate_continuous(x, x_sample, y_sample)[source]

Linear interpolation of continuous quantities.

Numpy equivalent would be np.interp(…, left=np.nan, right=np.nan), but numba currently doesn’t support those keyword arguments.

satpy.readers.gms.gms5_vissr_navigation.interpolate_navigation_prediction(attitude_prediction, orbit_prediction, observation_time)[source]

Interpolate predicted navigation parameters.

satpy.readers.gms.gms5_vissr_navigation.interpolate_nearest(x, x_sample, y_sample)[source]

Nearest neighbour interpolation.

satpy.readers.gms.gms5_vissr_navigation.interpolate_orbit_prediction(orbit_prediction, observation_time)[source]

Interpolate orbit prediction at the given observation time.

satpy.readers.gms.gms5_vissr_navigation.intersect_with_earth(view_vector, sat_pos, ellipsoid)[source]

Intersect instrument viewing vector with the earth’s surface.

Reference: Appendix E, section 2.11 in the GMS user guide.

Parameters:
  • view_vector (Vector3D) – Instrument viewing vector in earth-fixed coordinates.

  • sat_pos (Vector3D) – Satellite position in earth-fixed coordinates.

  • ellipsoid (EarthEllipsoid) – Earth ellipsoid.

Returns:

Intersection (Vector3D) with the earth’s surface.

satpy.readers.gms.gms5_vissr_navigation.matrix_vector(m, v)[source]

Multiply (3,3)-matrix and Vector3D.

satpy.readers.gms.gms5_vissr_navigation.normalize_vector(v)[source]

Normalize a Vector3D.

satpy.readers.gms.gms5_vissr_navigation.transform_earth_fixed_to_geodetic_coords(point, earth_flattening)[source]

Transform from earth-fixed to geodetic coordinates.

Parameters:
  • point (Vector3D) – Point in earth-fixed coordinates.

  • earth_flattening – Flattening of the earth.

Returns:

Geodetic longitude and latitude (degrees).

satpy.readers.gms.gms5_vissr_navigation.transform_image_coords_to_scanning_angles(point, image_offset, scanning_angles)[source]

Transform image coordinates to scanning angles.

Parameters:
Returns:

Scanning angles (x, y) at the pixel center (rad).

satpy.readers.gms.gms5_vissr_navigation.transform_satellite_to_earth_fixed_coords(point, orbit, attitude)[source]

Transform from earth-fixed to satellite angular momentum coordinates.

Parameters:
  • point (Vector3D) – Point in satellite angular momentum coordinates.

  • orbit (Orbit) – Orbital parameters

  • attitude (Attitude) – Attitude parameters

Returns:

Point (Vector3D) in earth-fixed coordinates.

satpy.readers.gms.gms5_vissr_navigation.transform_scanning_angles_to_satellite_coords(angles, misalignment)[source]

Transform scanning angles to satellite angular momentum coordinates.

Parameters:
  • angles (Vector2D) – Scanning angles in radians.

  • misalignment – Misalignment matrix (3x3)

Returns:

View vector (Vector3D) in satellite angular momentum coordinates.