Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
59697ad
IERS.open accepts network URL
sYnfo Jun 28, 2015
3d1c5b1
Use urllib.parse on Python3
sYnfo Jun 28, 2015
37bb14c
Amend documentation to show open can handle URL
sYnfo Jun 29, 2015
7e4668a
Use IERS_A_URL in test
sYnfo Jun 29, 2015
48d0d61
Retrieve the IERS_A_EXCEPT directly from github
sYnfo Jun 29, 2015
8190500
Amend documentation to show open can handle URL
sYnfo Jun 29, 2015
d60fe31
Add explanation of the change to CHANGES.rst
sYnfo Jun 29, 2015
b985dd8
Use local IERS file for testing
sYnfo Jul 10, 2015
ab11512
Test no longer uses remote data
sYnfo Jul 13, 2015
f6d3fa9
Do not import remote_data
sYnfo Jul 14, 2015
aa94a18
IERS.open does not use cache by default
sYnfo Jul 14, 2015
5c29fa3
Add docs for the new 'cache' argument
sYnfo Jul 25, 2015
bacbe66
Use urllib to convert path to URL
sYnfo Jul 25, 2015
918870e
coordinates: baseframe: Unnecessary if statement
JaiPEG Aug 3, 2015
665da14
coordinates: baseframe: Simplified if statement
JaiPEG Aug 3, 2015
38c35b4
Adds rough draft of the OrderedDescriptor and OrderedDescriptorContainer
embray Apr 10, 2015
db857be
Adapted the Model and Parameter classes to be an OrderedParameterCont…
embray Apr 10, 2015
622dd6d
Somewhat aside, but there's no point in this being a lazyproperty, as…
embray Apr 10, 2015
f966115
Adapts the coordinates package to use OrderedDescriptor and OrderedDe…
embray Apr 10, 2015
a6f154f
Update astropy_helpers submodule to include the recent fix for astrop…
embray Apr 10, 2015
0fa4bbb
Workaround for failing doctest on Python 2
embray Apr 13, 2015
2431707
Add a changelog entry for #3679 [skip ci]
embray Aug 4, 2015
f28d1a5
ENH: added lzma support to data file handler
Apr 5, 2015
7e06391
fixes for open files and compression support
Apr 7, 2015
98cc956
TST: mark.xfail used throughout test_data; fixed open file in test_hdf5
Apr 7, 2015
c1a67a6
BUG: cleanup of open files after ImportError in data.py, whitespace
Apr 7, 2015
1ab3582
data.py doc string and file opening changes suggested by mdboom
Apr 7, 2015
b715de7
The changelog entry for #3817 was in the wrong place.
embray Aug 11, 2015
d53db09
The changelog entry for #3728 was in the wrong section.
embray Aug 11, 2015
7be927a
Mark v1.0.4 released in the master changelog
embray Aug 11, 2015
5e5ca16
Changelog entries for LZMA support
dhomeier Aug 12, 2015
90d3d72
Merge pull request #3667 from dhomeier/lzmafile
embray Aug 12, 2015
78fa1b6
Allow units in Cutout2D, and shortcut for square cutouts
sargas Aug 12, 2015
2694e40
Fix doctest in docs for astropy.nddata.utils
sargas Aug 12, 2015
d2db9d8
Simplification of lazyproperty implementation--now a subclass of
embray Aug 13, 2015
17b5122
Merge pull request #4072 from embray/utils/lazyproperty-simplification
embray Aug 13, 2015
2eb6801
format_str for models without formal parameters.
nden Aug 14, 2015
d7aa288
improve code
nden Aug 14, 2015
5334c95
Merge pull request #4076 from nden/modeling_format_str
embray Aug 14, 2015
a36121b
Adds changelog entry for #4076 [skip ci]
embray Aug 14, 2015
5a0e4ad
Add wcsaxes dependency for doc builds and example.
patti Aug 13, 2015
a40e2c5
Add changelog entry.
patti Aug 14, 2015
86eb5b0
Merge pull request #4071 from sargas/cutout-units
mwcraig Aug 15, 2015
80768ee
Merge pull request #4074 from patti/wcs4docs
astrofrog Aug 16, 2015
23d937c
Add wcsaxes on ReadTheDocs
astrofrog Aug 16, 2015
02dea69
Merge pull request #3909 from patti/boundingboxes
nden Aug 17, 2015
a2e6b1e
Merge pull request #3897 from sYnfo/issue3850
embray Aug 17, 2015
1600316
Fixed a bug in resolve_name where if you pass fromlist=[''] in when i…
embray Aug 17, 2015
0595f5e
Added changelog entry for #4084 [skip ci]
embray Aug 17, 2015
c2ffebf
Add the ability to pass additional parts to the dotted name passed to…
embray Aug 17, 2015
1573f32
Use resolve_name instead of __import__ where appropriate (except in
embray Aug 17, 2015
a1a512a
Added changelog entry for #4083 [skip ci]
embray Aug 17, 2015
02bd5b0
Merge pull request #4084 from embray/utils/resolve-name-fromlist-bug
embray Aug 17, 2015
65c86d7
Merge pull request #4083 from embray/utils/resolve-name-import
embray Aug 17, 2015
cc100ac
Making sigma_clip deal with NaN input values
bsipocz Aug 6, 2015
149d58e
Changing np.isnan check to ~np.isfinite, and adding warning
bsipocz Aug 17, 2015
d71400e
Adding test for sigma clipping invalid data
bsipocz Aug 18, 2015
e3346ea
Updating sigma_clip's docstring
bsipocz Aug 18, 2015
4c61865
Adding CHANGELOG entry [skip ci]
bsipocz Aug 18, 2015
40dcb51
Merge pull request #4053 from JaiPEG/changes
embray Aug 18, 2015
882b78d
Import from ipykernel if possible
larrybradley Aug 14, 2015
b31a15e
Import from ipywidgets if possible
larrybradley Aug 14, 2015
dd6f6e8
Use FloatProgressWidget for IPython 2.x
larrybradley Aug 14, 2015
a6d8bde
Use ipywidgets and FloatProgress() on for ipython >= 4
larrybradley Aug 17, 2015
3ec5df8
Updated changelog for IPython 4.x/Jupyter 1.x support [skip ci]
larrybradley Aug 17, 2015
4ef7791
Merge pull request #4078 from larrybradley/jupyter
embray Aug 18, 2015
3ecff39
Merge pull request #4051 from bsipocz/stat_sigma_clip_nan
embray Aug 18, 2015
45e2a8d
Make sure test for unique=True tests duplicate keyword
mwcraig Jul 17, 2015
192f54a
Add test for issue #3967: extend with commentary cards and unique=True
mwcraig Jul 17, 2015
43c7ed3
Add parentheses to ensure correct order of evaluation
mwcraig Jul 17, 2015
f3c7523
Remove confusing comment
mwcraig Aug 19, 2015
746b3a2
Add changelog entry [skip ci]
mwcraig Aug 19, 2015
3710c01
Merge pull request #3970 from mwcraig/fits/fix-extend-uniq
embray Aug 19, 2015
c1030c3
Merge pull request #3679 from embray/utils/ordered-descr
embray Aug 19, 2015
7a013c6
Use OrderedDict instead of {} to make debugging easier
jwoillez Aug 20, 2015
49a63f0
Add shape attribute to Argument
jwoillez Aug 20, 2015
0e52f49
Add name_for_call property to Argument
jwoillez Aug 20, 2015
6fcdc39
Fix warning when passing fixed size arrays to ERFA.
jwoillez Aug 20, 2015
23960b1
User OrderedDict from utils.compat.odict for python 2.6 support
jwoillez Aug 20, 2015
6e07845
Remove erfa_generator.py from average analysis
jwoillez Aug 20, 2015
75e78b1
Merge pull request #4087 from jwoillez/fix_erfa_warning
mdboom Aug 20, 2015
5296335
Update bounding_box property and create render method on Model class.
patti Aug 21, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .continuous-integration/travis/setup_dependencies_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ then
fi

# DOCUMENTATION DEPENDENCIES
# build_sphinx needs sphinx and matplotlib (for plot_directive). Note that
# this matplotlib will *not* work with py 3.x, but our sphinx build is
# build_sphinx needs sphinx as well as matplotlib and wcsaxes (for plot_directive).
# Note that this matplotlib will *not* work with py 3.x, but our sphinx build is
# currently 2.7, so that's fine
if [[ $SETUP_CMD == build_sphinx* ]]
then
$CONDA_INSTALL Sphinx=1.2.2 Pygments matplotlib
pip install wcsaxes
fi

# COVERAGE DEPENDENCIES
Expand Down
53 changes: 45 additions & 8 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ New Features
- Add a function ``get_read_trace()`` that returns a traceback of the
attempted read formats for the last call to ``astropy.io.ascii.read``. [#3688]

- Supports LZMA decompression via ``get_readable_fileobj`` [#3667]

- ``astropy.io.fits``

- Support reading and writing from bzip2 compressed files. i.e. ``.fits.bz2``
Expand Down Expand Up @@ -118,6 +120,9 @@ New Features
- Added ``cenfunc``, ``stdfunc``, and ``axis`` keywords to
``sigma_clipped_stats``. [#3792]

- ``sigma_clip`` automatically masks invalid input values (NaNs, Infs) before
performing the clipping [#4051]

- Added the ``histogram`` routine, which is similar to ``np.histogram`` but
includes several additional options for automatic determination of optimal
histogram bins. Associated helper routines include ``bayesian_blocks``,
Expand Down Expand Up @@ -191,11 +196,21 @@ New Features

- ``astropy.utils``

- Added new ``OrderedDescriptor`` and ``OrderedDescriptorContainer`` utility
classes that make it easier to implement classes with declarative APIs,
wherein class-level attributes have an inherit "ordering" to them that is
specified by the order in which those attributes are defined in the class
declaration (by defining them using special descriptors that have
``OrderedDescriptor`` as a base class). See the API documentation for
these classes for more details. Coordinate frames and models now use this
interface. [#3679]

- Added function ``dtype_info_name`` to the ``data_info`` module to provide
the name of a ``dtype`` for human-readable informational purposes. [#3868]

- Added ``classproperty`` decorator--this is to ``property`` as
``classmethod`` is to normal instance methods. [#3982]
- ``iers.open`` now handles network URLs, as well as local paths. [#3850]

- The ``astropy.utils.wraps`` decorator now takes an optional
``exclude_args`` argument not shared by the standard library ``wraps``
Expand All @@ -205,6 +220,14 @@ New Features
of the wrapper function. This is particularly useful when wrapping an
instance method as a function (to exclude the ``self`` argument). [#4017]

- ``get_readable_fileobj`` can automatically decompress LZMA ('.xz')
files using the ``lzma`` module of Python 3.3+ or, when available, the
``backports.lzma`` package on earlier versions. [#3667]

- The ``resolve_name`` utility now accepts any number of additional
positional arguments that are automatically dotted together with the
first ``name`` argument. [#4083]

- ``astropy.visualization``

- Added the ``hist`` function, which is similar to ``plt.hist`` but
Expand Down Expand Up @@ -440,13 +463,6 @@ Bug fixes

- ``astropy.units``

- Added frequency-equivalency check when declaring doppler equivalencies
[#3728]

- Define ``floor_divide`` (``//``) for ``Quantity`` to be consistent
``divmod``, such that it only works where the quotient is dimensionless.
This guarantees that ``(q1 // q2) * q2 + (q1 % q2) == q1``. [#3817]

- ``astropy.utils``

- ``astropy.visualization``
Expand All @@ -463,6 +479,8 @@ Other Changes and Additions

- The version of ``PLY`` that ships with astropy has been updated to 3.6.

- WCSAxes is now required for doc builds. [#4074]


1.0.5 (unreleased)
------------------
Expand Down Expand Up @@ -547,6 +565,9 @@ API Changes

- ``astropy.utils``

- ``console`` was updated to support IPython 4.x and Jupyter 1.x.
[#4078]

- ``astropy.vo``

- ``astropy.wcs``
Expand All @@ -568,6 +589,9 @@ Bug Fixes

- ``astropy.io.fits``

- Fix bug when extending one header (without comments) with another
(with comments). [#3967]

- ``astropy.io.misc``

- ``astropy.io.registry``
Expand All @@ -576,6 +600,8 @@ Bug Fixes

- ``astropy.modeling``

- Cleaned up ``repr`` of models that have no parameters. [#4076]

- ``astropy.nddata``

- ``astropy.stats``
Expand All @@ -590,6 +616,10 @@ Bug Fixes

- ``astropy.utils``

- ``resolve_name`` no longer causes ``sys.modules`` to be cluttered with
additional copies of modules under a package imported like
``resolve_name('numpy')``. [#4084]

- ``astropy.vo``

- ``astropy.wcs``
Expand All @@ -600,7 +630,7 @@ Other Changes and Additions
- Nothing changed yet.


1.0.4 (unreleased)
1.0.4 (2015-08-11)
------------------

New Features
Expand Down Expand Up @@ -699,6 +729,13 @@ Bug Fixes

- ``astropy.units``

- Added frequency-equivalency check when declaring doppler equivalencies
[#3728]

- Define ``floor_divide`` (``//``) for ``Quantity`` to be consistent
``divmod``, such that it only works where the quotient is dimensionless.
This guarantees that ``(q1 // q2) * q2 + (q1 % q2) == q1``. [#3817]

- Fixed the documentation of supported units to correctly report support for
SI prefixes. Previously the table of supported units incorrectly showed
several derived unit as not supporting prefixes, when in fact they do.
Expand Down
9 changes: 6 additions & 3 deletions astropy/_erfa/core.c.templ
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ typedef struct {

static PyObject *Py_{{ func.pyname }}(PyObject *self, PyObject *args, PyObject *kwds)
{
{%- for arg in func.args_by_inout('in|inout|out|ret|stat') %}
{%- for arg in func.args_by_inout('in|inout|out') %}
{{ arg.ctype }} (*_{{ arg.name }}){{ arg.cshape }};
{%- endfor %}
{%- for arg in func.args_by_inout('ret|stat') %}
{{ arg.ctype_ptr }} _{{ arg.name }};
{%- endfor %}
{%- if func.args_by_inout('stat')|length > 0 %}
Expand All @@ -52,10 +55,10 @@ static PyObject *Py_{{ func.pyname }}(PyObject *self, PyObject *args, PyObject *

do {
{%- for arg in func.args_by_inout('in|inout|out') %}
_{{ arg.name }} = (({{ arg.ctype }} *)(dataptrarray[{{ func.args.index(arg) }}])){%- if arg.ctype_ptr[-1] != '*' %}[0]{%- endif %};
_{{ arg.name }} = (({{ arg.ctype }} (*){{ arg.cshape }})(dataptrarray[{{ func.args.index(arg) }}]));
{%- endfor %}

{{ func.args_by_inout('ret|stat')|map(attribute='name')|surround('_', ' = ')|join }}{{func.name}}({{ func.args_by_inout('in|inout|out')|map(attribute='name')|prefix('_')|join(', ') }});
{{ func.args_by_inout('ret|stat')|map(attribute='name')|surround('_', ' = ')|join }}{{func.name}}({{ func.args_by_inout('in|inout|out')|map(attribute='name_for_call')|join(', ') }});

{%- for arg in func.args_by_inout('ret|stat') %}
*(({{ arg.ctype_ptr }} *)(dataptrarray[{{ func.args.index(arg) }}])) = _{{ arg.name }};
Expand Down
14 changes: 13 additions & 1 deletion astropy/_erfa/erfa_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import re
import os.path
from astropy.utils.compat.odict import OrderedDict


ctype_to_dtype = {'double' : "numpy.double",
Expand Down Expand Up @@ -181,6 +182,17 @@ def dtype(self):
def ndim(self):
return len(self.shape)

@property
def cshape(self):
return ''.join(['[{0}]'.format(s) for s in self.shape])

@property
def name_for_call(self):
if self.is_ptr:
return '_'+self.name
else:
return '*_'+self.name

def __repr__(self):
return "Argument('{0}', name='{1}', ctype='{2}', inout_state='{3}')".format(self.definition, self.name, self.ctype, self.inout_state)

Expand Down Expand Up @@ -378,7 +390,7 @@ def surround(a_list, pre, post):
with open(erfahfn, "r") as f:
erfa_h = f.read()

funcs = {}
funcs = OrderedDict()
section_subsection_functions = re.findall('/\* (\w*)/(\w*) \*/\n(.*?)\n\n',
erfa_h, flags=re.DOTALL|re.MULTILINE)
for section, subsection, functions in section_subsection_functions:
Expand Down
21 changes: 12 additions & 9 deletions astropy/config/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from ..extern.configobj import configobj, validate
from ..utils.exceptions import AstropyWarning, AstropyDeprecationWarning
from ..utils import find_current_module
from ..utils.introspection import resolve_name
from ..utils.misc import InheritDocstrings
from .paths import get_config_dir

Expand Down Expand Up @@ -219,6 +220,11 @@ class _Conf(config.ConfigNamespace):
# this is used to make validation faster so a Validator object doesn't
# have to be created every time
_validator = validate.Validator()
cfgtype = None
"""
A type specifier like those used as the *values* of a particular key in a
``configspec`` file of ``configobj``.
"""

def __init__(self, defaultvalue='', description=None, cfgtype=None,
module=None, aliases=None):
Expand Down Expand Up @@ -308,12 +314,14 @@ def set_temp(self, value):
Sets this item to a specified value only inside a with block.

Use as::

ITEM = ConfigItem('ITEM', 'default', 'description')

with ITEM.set_temp('newval'):
... do something that wants ITEM's value to be 'newval' ...
#... do something that wants ITEM's value to be 'newval' ...
print(ITEM)

# ITEM is now 'default' after the with block
# ITEM is now 'default' after the with block

Parameters
----------
Expand Down Expand Up @@ -565,11 +573,7 @@ def _deprecation_warning(self):
AstropyDeprecationWarning)

def _get_target(self):
if self._new_module not in sys.modules:
__import__(self._new_module)
mod = sys.modules[self._new_module]
cfg = getattr(mod, 'conf')
return cfg
return resolve_name(self._new_module, 'conf')

def set(self, value):
self._deprecation_warning()
Expand Down Expand Up @@ -841,8 +845,7 @@ def update_default_config(pkg, default_cfg_dir_or_fn, version=None):
identical = False

if version is None:
mod = __import__(pkg)
version = mod.__version__
version = resolve_name(pkg, '__version__')

# Don't install template files for dev versions, or we'll end up
# spamming `~/.astropy/config`.
Expand Down
Loading