Pdr

Latest version: v1.3.0

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 6

1.1.1

Fixed
- Bugfix for compatibility for Python 3.9 by adding two features of Python 3.10.
- pdr.py: if inspect.get_annotations is not available, use a fallback
implementation (incomplete, but works for the case we care about).
- pdrtypes.py: if typing.TypeAlias is not available, define it by hand.

1.1.0

Added

Features
- Support for 4 bit VAX_REAL Tables
- Ability to modify Metadata objects and have changes propagate to pdr objects.
Suggested feature in issue [55](https://github.com/MillionConcepts/pdr/issues/55)


Example Usage:
Display an BSQ RGB image as a vertical image with
each channel split into a column

data.metadata['IMAGE']['LINES'] = (
data.metadata['IMAGE']['BANDS'] * data.metadata['IMAGE']['LINES']
)
data.metadata['IMAGE']['BANDS'] = 1
data.load_metadata_changes()
data.load('IMAGE', reload=True)
data.show('IMAGE')

If the image was not loaded before the metadata change, the `reload=True`
argument is unnecessary.

Dataset Support
- Cassini UVIS EUV, FUV
- Voyager IRIS full-res spectral observations
- GRSFE AVIRIS and TIMS tables
- all GRSFE TABLE_HEADER and SPECTRUM_HEADER pointers
- Affected datasets: AVIRIS and TIMS tables, PARABOLA, and wind experiment

Changed
- Updated several unit tests based on the Metadata changes

Fixed
- Bug which prevented reading of single band images with an interleave key if
the interleave was BIL and the image had prefix/suffix. Resolves issue
[55](https://github.com/MillionConcepts/pdr/issues/55)
- Bug in which some pds4 data objects were not being successfully cast from
PDS4tools arrays to numpy arrays
- Bug in which padding bytes before top level containers in ASCII tables not
described by a column in the label were not being respected. See below for
description of this type of label writing practice.

michael: yeah. the problem is that this isn't actually wrong, it's just depraved.
it violates only the spirit of the law

1.0.7

Added

Features
- `pdr.fastread()`, a convenience function for opening a product without
checking for a detached label. This function only works if you point it at
the file that contains the product's label (attached or detached). Improves
speed on slow filesystems or for large numbers of products, particularly
when you are only interested in their metadata or the data objects you want
to load from them are small.

Dataset Support
- MEX SPICAM and MRS datasets
- Comet D/Shoemaker-Levy 9/Jupiter Impact Observing Campaign datasets
- see [supported_datasets.md](docs/supported_datasets.md) for details

Other
- Lots of docstrings, type hinting, and other in-code documentation
- Additional shared types to support static analysis and code readability
- `pdr-tests`-compatible annotations for special cases

Changed
- Assorted code refactoring, linting, and minor backend improvements
- Substantial performance increases for wide tables with many repeated items
- Modified some special cases for pandas 2.2.x compatibility

Fixed
- A bug in PDS4 label handling that sometimes dropped repeated child elements
- An accidentally-skipped out-of-date unit test for DSV tables
- Slow imports are again delayed until needed

Removed
- Unused numpy-based ASCII table parser

1.0.6

Added
Features
- `Data` now directly affords a `find_special_constants()` method

Dataset Support
- most IHW datasets
- additional Voyager 1 and 2 datasets
- GRSFE and WFF/ATM datasets
- LOIRP dataset
- additional MSL, Apollo, and Mariner datasets
- additional Earth-based lunar data
- Viking Lander datasets
- Mars Odyssey DAN and SAM data
- MEX ASPERA, HRSC, SRC, and PFS data
- most Phoenix TEGA, ELEC, and WCL products
- see [supported_datasets.md](docs/supported_datasets.md) for details

Changed
- Assorted type-hinting and other in-code documentation improved.
- Behavior for character stripping in string columns of ASCII tables was
inconsistent. To increase usability, string columns of ASCII tables now
discard preceding and trailing spaces, commas, newlines, and double-quotes
(regardless of strict label specification).
- Generally improved performance on table reading

Fixed
- Incorrect column bounds due to unusual prefix/suffix/infix specifications
in some ASCII tables
- Incorrect column bounds due to container padding in some tables
- FITS HDUs with non-printable characters in header cards will now load,
discarding any such cards from the header (unless the cards are required,
e.g. NAXIS1) Resolves issue [52](https://github.com/MillionConcepts/pdr/issues/52)

1.0.5

Added
Features
- doc strings for API on readthedocs
- Error tracking features that were accidentally deleted from the last version were re-added
Dataset Support
- most Voyager 1 and 2 datasets
- additional MGS datasets (MAG/ER, RSS EDS, MOC)
- Mariner 9 datasets
- Pioneer 10 and 11 GTT RDRs
- Sakigake, Suisei, and SOHO datasets
- ICE and IUE datasets
- see [supported_datasets.md](https://github.com/MillionConcepts/pdr/blob/main/supported_datasets.md) for details.

Fixed
- Tables with containers with REPETITIONS in them were reading the same data each repetition, this has been fixed
- Exponential notation in pvl quantity objects are now properly handled

Removed
- MRO MCS DDR data is not supported due to formatting issues

1.0.4

Added
Features
- support for GIF files referenced as PDS3 objects
- improved verbosity of some file-not-found error messages

Dataset Support
- MER 1 and 2
- Ulysses
- see [supported_datasets.md](https://github.com/MillionConcepts/pdr/blob/main/supported_datasets.md) for details.

Changed
- updated install specifications
- added hotpatch to address `pds4-tools` Python 3.12 incompatibility,
to be removed following `pds4-tools` 1.4 release

Fixed
- correctly interpret PVL non-decimal integer representations as
`int(non_decimal_integer, base=int(radix))`. e.g., `pdr` will now interpret
the PVL statement:


"SAMPLE_BIT_MASK = 21111111111111111"


as a metadata item with key "SAMPLE_BIT_MASK" and value 65535.

Please note that the bit masks are not applied programmatically because we don't believe
their meanings are consistent across the corpus of planetary data. However, users are
encouraged to explore their use within their own work and enjoy the glories of the Python `&` operator.

An example for how to apply a bit mask using the `&` bitwise operator:

data = pdr.read('/path/to/file.img')
masked = data.IMAGE & data.metaget('SAMPLE_BIT_MASK')

Alternatively, if you're using this value for something for which you'd prefer to have the original PVL
value, use the `bin`, `oct`, or `hex` packages for base 2, 8, or 16 respectively to convert the value
back from an integer.

([Resolves issue 51](https://github.com/MillionConcepts/pdr/issues/51))
- correctly interpret PVL Sequences and Sets of Unquoted Strings as
`tuple[str]` or `set[str]` respectively
- fix some cases in which PVL End Statements were incorrectly interpreted
as parameters with empty-string values

Page 2 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.