irfpy.vexpvat.pvat2

More sophisticated pvat retriever.

Warning

This module is deprecated. Use irfpy.vexpvat.vexspice module.

irfpy.vexpvat.pvat2 provides more sophisticated functinality of irfpy.vexpvat.pvat. Compensations are the slow processing.

As the datafile in Peje’s format is only 1 minutes resolution, this may not enough to provide more detailed analysis. This module provides the interplation.

For simple implementation, the module provides the orbit number based functionality. There is small data gap in the edges of one file, but it should not be significant because the data gap is very small and they are normally in the apocenter where no spacecraft motion is expected much.

Usage

First, instance PvatFile. Usually, one can use getPvatFile() for this purpose.

>>> if not isdb():
...     pass    
...     pvat = getPvatFile(1500)   # Instance the PVAT file for 1500.
...     t0 = datetime.datetime(2010, 5, 29, 20, 15, 23)
...     pos = pvat.getInterpol(t0)
...     print('%.2f %.2f %.2f' % (pos[0], pos[1], pos[2]))
302.77 2579.72 -70981.57

Use irfpy.vexpvat.orbnum module for converting time and the orbit number.

class irfpy.vexpvat.pvat2.PvatFile(filename)[source]

Bases: object

PVAT file.

Replacement of irfpy.vexpvat.pvat.PvatFile, while only file name is allowed. No uri can be specified.

getInterpol(t, extrapol=300)[source]

Get the position of S/C in VSO frame.

Interpolated position by spline.

Parameters
  • t (Instances allowed in irfpy.util.utc.convert.) – Time. Either iterative or non-iterative.

  • extrapol – Duration in seconds of the time allowed the extrapolation. Default is 300 seconds. If either of the given time exceed the time range of the data in the datafile by more than the value specified in extrapol, ValueError is thrown.

Returns

Position.

Return type

np.array with shape of (3,) or (3, N), where N is len(t).

irfpy.vexpvat.pvat2.getPvatFile(orbnr)[source]
irfpy.vexpvat.pvat2.isdb()[source]
irfpy.vexpvat.pvat2.doctests()[source]