bwinkel / pycraf

pycraf is a package that provides functions and procedures for various tasks in spectrum-management compatibility studies.
35 stars 15 forks source link

RA.769 table (protection thresholds) has poor documentation and buggy unit support #6

Closed bwinkel closed 5 years ago

bwinkel commented 5 years ago

The protection.ra769_limits function returns an astropy.table.Table object containing RAS threshold values with units attached. Unfortunately, there was a bug in the Column implementation of Table, which allowed logarithmic units to be set, but one could not retrieve them properly (the .unit property works, but not .quantity). This has been fixed recently (see astropy/astropy#8424), but was not released yet. Once the new astropy version is released, the pycraf documentation should be updated to highlight the fact.

The documentation regarding the protection.ra769_limits should be improved anyway, recommending to actually make use of the units in the returned Table object. Many people (myself included) often just use the numbers and attach the units manually. Another option could be to return a astropy.table.QTable directly, the rows of which are astropy.units.Quantity objects.