Language string | Code string | Query string | URI string | Relevance int64 | Notes string |
|---|---|---|---|---|---|
Python | """Test ``with_redshift`` with the distance off."""
default_cosmo = default_cosmology.get()
z = 15 * cu.redshift
# 1) Default (without specifying the cosmology)
with default_cosmology.set(cosmo):
equivalency = cu.with_redshift(distance=None)
with pytest.raises(u.... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_distance_off | 0 | |
Python | self.send_response(200, 'OK')
self.end_headers() | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#do_OPTIONS | 0 | |
Python | conf.use_internet = False | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#setup_module | 0 | |
Python | state = self.__dict__.copy()
state.pop('_hash', None)
return state | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#__getstate__ | 0 | |
Python | other = self._dimensionally_compatible_unit(other)
if other is NotImplemented:
return NotImplemented
return other.physical_type._dimensional_analysis(self, "__truediv__") | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#__rtruediv__ | 0 | |
Python | def dummy_ufunc(*args, **kwargs):
return np.sqrt(*args, **kwargs)
def register():
return {dummy_ufunc: helper_sqrt}
workers = 8
with concurrent.futures.ThreadPoolExecutor(max_workers=workers) as executor:
for p in range(10000):
helpers = Ufun... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_thread_safety | 0 | |
Python | q1 = np.array([1., 2., 6.]) * u.m
assert np.all(q1.sum() == 9. * u.m)
assert np.all(np.sum(q1) == 9. * u.m)
q2 = np.array([[4., 5., 9.], [1., 1., 1.]]) * u.s
assert np.all(q2.sum(0) == np.array([5., 6., 10.]) * u.s)
assert np.all(np.sum(q2, 0) == np.array([5., 6., 10.]) * u.s) | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_sum | 0 | |
Python | with self._lock:
if value is None:
self.UNSUPPORTED |= {key}
self.pop(key, None)
else:
super().__setitem__(key, value)
self.UNSUPPORTED -= {key} | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#__setitem__ | 0 | |
Python | """
Regression test for issue #11473
"""
q = cls(input)
assert str(q) == expstr
# Deleting whitespaces since repr appears to be adding them for some values
# making the test fail.
assert repr(q).replace(" ", "") == f'<{cls.__name__}{exprepr}>'.replace(" ","") | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_str_repr_angles_nan | 0 | |
Python | self._description = None | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#description | 0 | |
Python | attrib = w.object_attrs(self, self._attr_list)
if 'unit' in attrib:
attrib['unit'] = self.unit.to_string('cds')
with w.tag(self._element_name, attrib=attrib):
if self.description is not None:
w.element('DESCRIPTION', self.description, wrap=True)
if not... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#to_xml | 0 | |
Python | with fits.open(self.data('comp.fits'),
disable_image_compression=True) as hdul:
# The compressed image HDU should show up as a BinTableHDU, but
# *not* a CompImageHDU
assert isinstance(hdul[1], fits.BinTableHDU)
assert not isinstance(hdul[1], fits.C... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_disable_image_compression | 0 | |
Python | hdu = ImageHDU(data=dask_array_in_mem)
assert isinstance(hdu.data, da.Array) | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_construct_image_hdu | 0 | |
Python | """
Adjust or skip data entries if a row is inconsistent with the header.
The default implementation does no adjustment, and hence will always trigger
an exception in read() any time the number of data entries does not match
the header.
Note that this will *not* be called if th... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#inconsistent_handler | 0 | |
Python | """Test issue in #2997"""
mask_b = np.array([True, True, False, False])
for select in (mask_b, slice(0, 2)):
t = Table(masked=True)
t['a'] = Column([1, 2, 3, 4])
t['b'] = MaskedColumn([11, 22, 33, 44], mask=mask_b)
t['c'] = MaskedColumn([111, 222, 333, 444], mask=[True, False, Tr... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_setting_from_masked_column | 0 | |
Python | """
Appropriate errors get raised.
"""
# Bad column name as string
with pytest.raises(ValueError):
T1.group_by('f')
# Bad column names in list
with pytest.raises(ValueError):
T1.group_by(['f', 'g'])
# Wrong length array
with pytest.raises(ValueError):
T1.group_b... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_group_by_errors | 0 | |
Python | """
Function corresponding to '&' operation.
Parameters
----------
left, right : `astropy.modeling.Model` or ndarray
If input is of an array, it is the output of `coord_matrix`.
Returns
-------
result : ndarray
Result from this operation.
"""
noutp = _compute_n_out... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#_cstack | 1 | |
Python | """
Tests that compound evaluate function produces the same
result as the models fix_inputs operator is applied
when using the keyword
"""
y, x = np.mgrid[:10, :10]
model_params = [3, 0, 0.1, 1, 0.5, 0]
model = Gaussian2D(1, 2, 0, 0.5)
compound = fix_inputs(model, {"x": x + 5})
as... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_compound_evaluate_fix_inputs_by_keyword | 0 | |
Python | if not HAS_SCIPY and model['class'] in SCIPY_MODELS:
pytest.skip()
m = model['class'](**model['parameters'])
for args in model['evaluation']:
if len(args) == 2:
kwargs = dict(zip(('x', 'y'), args))
else:
kwargs = dict(zip(('x', 'y', 'z'), args))
if kwa... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_models_evaluate_without_units | 0 | |
Python | g = Gaussian1D(
amplitude=[1 * u.J, 2. * u.J],
mean=[1 * u.m, 5000 * u.AA],
stddev=[0.1 * u.m, 100 * u.AA],
n_models=2)
assert_quantity_allclose(g(1.01 * u.m), [0.99501248, 0.] * u.J)
assert_quantity_allclose(
g(u.Quantity([1.01 * u.m, 5010 * u.AA])), [0.99501248, 1.99002... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_gaussian1d_n_models | 0 | |
Python | self.key = 'test'
self.val = 'value' | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#setup | 0 | |
Python | if instance is None:
# This is an unbound descriptor on the class
raise ValueError('cannot set unbound descriptor')
setattr(instance._parent, self.attr, value) | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#__set__ | 0 | |
Python | u, c = next(valid_urls)
f = download_file(u, cache=True)
bf = os.path.abspath(os.path.join(os.path.dirname(f), "bogus"))
with open(bf, "wt") as f:
f.write("bogus file that exists")
with pytest.raises(CacheDamaged) as e:
check_download_cache()
assert bf in e.value.bad_files
clear_... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#test_check_download_cache_finds_bogus_subentries | 0 | |
Python | np_func = getattr(np, nanfuncname[3:])
fill_value = _nanfunc_fill_values.get(nanfuncname, None)
def nanfunc(a, *args, **kwargs):
from astropy.utils.masked import Masked
a, mask = Masked._get_data_and_mask(a)
if issubclass(a.dtype.type, np.inexact):
nans = np.isnan(a)
... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#masked_nanfunc | 0 | |
Python | """
Time as a decimal year, with integer values corresponding to midnight
of the first day of each year. For example 2000.5 corresponds to the
ISO time '2000-07-02 00:00:00'.
"""
name = 'decimalyear'
def set_jds(self, val1, val2):
self._check_scale(self._scale) # Validate scale.
... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#TimeDecimalYear | 0 | |
Python | @abc.abstractmethod
def __init__(self, t, y, dy=None):
pass
@classmethod
def from_timeseries(cls, timeseries, signal_column_name=None, uncertainty=None, **kwargs):
"""
Initialize a periodogram from a time series object.
If a binned time series is passed, the time at the cen... | Modeling's `separability_matrix` does not compute separability correctly for nested CompoundModels
Consider the following model:
```python
from astropy.modeling import models as m
from astropy.modeling.separable import separability_matrix
cm = m.Linear1D(10) & m.Linear1D(5)
```
It's separability matrix as y... | astropy_d16bfe05a744909de4b27f5875fe0d4ed41ce607#BasePeriodogram | 0 | |
Python | r"""
For a WCS returns `False` if square image (detector) pixels stay square
when projected onto the "plane of intermediate world coordinates"
as defined in
`Greisen & Calabretta 2002, A&A, 395, 1061 <https://ui.adsabs.harvard.edu/abs/2002A%26A...395.1061G>`_.
It will return `True` if transformation... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#is_proj_plane_distorted | 0 | |
Python | from copy import deepcopy
new_copy = self.__class__()
new_copy.naxis = deepcopy(self.naxis, memo)
WCSBase.__init__(new_copy, deepcopy(self.sip, memo),
(deepcopy(self.cpdis1, memo),
deepcopy(self.cpdis2, memo)),
deepcopy... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#__deepcopy__ | 0 | |
Python | """The Cosmology class as a :func:`pytest.fixture`."""
return self.cls | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#cosmo_cls | 0 | |
Python | return "" | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#_receive_notification | 0 | |
Python | out = np.nanargmax(self.q)
expected = np.nanargmax(self.q.value)
assert out == expected | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#test_nanargmax | 0 | |
Python | q = u.Quantity(1.0, u.meter)
# Manually turn this on to simulate what might happen in a subclass
q._include_easy_conversion_members = True
q.foo = 42
attrs = dir(q)
assert 'centimeter' in attrs
assert 'cm' in attrs
assert 'parsec' in attrs
assert 'foo' in attrs
assert 'to' in attrs
... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#test_implicit_conversion_autocomplete | 0 | |
Python | return cls | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#__new__ | 0 | |
Python | """
Convert to a quantity in the specified unit.
Parameters
----------
unit : unit-like
The unit to convert to.
equivalencies : list of tuple
A list of equivalence pairs to try if the units are not directly
convertible (see :ref:`astropy:unit_... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#to | 0 | |
Python | """
Set format and round trip through a format that shares out_subfmt
"""
t = Time('+02000-02-03', format='fits', out_subfmt='date_hms', precision=5)
tc = t.copy()
t.format = 'isot'
assert t.precision == 5
assert t.out_subfmt == 'date_hms'
assert t.value == '2000-02-03T00:00:00.00000'
... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#test_set_format_shares_subfmt | 0 | |
Python | """Check broadcasting rules in interactions with Quantity."""
t0 = TimeDelta(np.arange(12.).reshape(4, 3), format='sec')
with pytest.raises(ValueError):
t0 + np.arange(4.) * u.s | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#test_invalid_quantity_broadcast | 0 | |
Python | """
Determines the constellation(s) a given coordinate object contains.
Parameters
----------
coord : coordinate-like
The object to determine the constellation of.
short_name : bool
If True, the returned names are the IAU-sanctioned abbreviated
names. Otherwise, full names ... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#get_constellation | 0 | |
Python | if not self._required_columns_enabled:
return
if self._required_columns is not None:
if self._required_columns_relax:
required_columns = self._required_columns[:len(self.colnames)]
else:
required_columns = self._required_columns
... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#_check_required_columns | 1 | |
Python | if data.imag == 0.0:
data = f'{data.real!r}'
elif data.real == 0.0:
data = f'{data.imag!r}j'
elif data.imag > 0:
data = f'{data.real!r}+{data.imag!r}j'
else:
data = f'{data.real!r}{data.imag!r}j'
return self.represent_scalar('tag:yaml.org,2002:python/complex', data) | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#_complex_representer | 0 | |
Python | """
Whether or not the header has been modified; this is a property so that
it can also check each card for modifications--cards may have been
modified directly without the header containing it otherwise knowing.
"""
modified_cards = any(c._modified for c in self._cards)
... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#_modified | 0 | |
Python | """
Read in data.
Parameters
----------
cls : class
*args
The arguments passed to this method depend on the format.
format : str or None
cache : bool
Whether to cache the results of reading in the data.
**kwargs
The arg... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#read | 0 | |
Python | example_qdp = """
! Initial comment line 1
! Initial comment line 2
READ TERR 1
READ SERR 3
! Table 0 comment
!a a(pos) a(neg) b c ce d
53000.5 0.25 -0.5 1 1.5 3.5 2
54000.5 1.25 -1.5 2 2.5 4.5 3
NO NO NO NO NO
! Table 1 comme... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#test_roundtrip_example | 0 | |
Python | object_state = list(super().__reduce__())
object_state[2] = (object_state[2], self.__dict__)
return tuple(object_state) | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#__reduce__ | 0 | |
Python | """
Get groups for ``table`` on specified ``keys``.
Parameters
----------
table : `Table`
Table to group
keys : str, list of str, `Table`, or Numpy array
Grouping key specifier
Returns
-------
grouped_table : Table object with groups attr set accordingly
"""
fro... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#_table_group_by | 0 | |
Python | for param in self.param_names:
if getattr(self, param).unit is not None:
return True
else:
return False | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#_has_units | 0 | |
Python | ls = iers.LeapSeconds.from_leap_seconds_list(file)
assert ls.expires == Time('2020-06-28', scale='tai')
assert ls['mjd'][0] == 41317
assert ls['tai_utc'][0] == 10
assert ls['mjd'][-1] == 57754
assert ls['tai_utc'][-1] == 37
self.verify_day_month_year(ls) | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#test_read_leap_seconds_list | 0 | |
Python | """
Raised if units are missing or invalid.
""" | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#UnitsError | 0 | |
Python | _required_columns = None
_required_columns_enabled = True
# If _required_column_relax is True, we don't require the columns to be
# present but we do require them to be the correct ones IF present. Note
# that this is a temporary state - as soon as the required columns
# are all present, we toggle ... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#BaseTimeSeries | 1 | |
Python | def __getitem__(self, item):
"""
Retrieve Table row's indices by value slice.
Parameters
----------
item : column element, list, ndarray, slice or tuple
Can be a value of the table primary index, a list/ndarray
of such values, or a value slice (both... | TimeSeries: misleading exception when required column check fails.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check ou... | astropy_298ccb478e6bf092953bca67a3d29dc6c35f6752#TableLocIndices | 0 | |
Python | string = unit_format.Generic.to_string(self)
return f'Unit("{string}")' | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#__repr__ | 0 | |
Python | s1 = PhysicsSphericalRepresentation(phi=[8, 9] * u.hourangle,
theta=[5, 6] * u.deg,
r=[10, 20] * u.kpc)
with pytest.raises(AttributeError):
s1.phi = 1. * u.deg
with pytest.raises(AttributeError):
... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#test_readonly | 0 | |
Python | """
The data in this frame as an `~astropy.coordinates.EarthLocation` class.
"""
from astropy.coordinates.earth import EarthLocation
cart = self.represent_as(CartesianRepresentation)
return EarthLocation(x=cart.x, y=cart.y, z=cart.z) | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#earth_location | 1 | |
Python | """Compute the polar motion p-matrix at the given time.
If the nutation-precession matrix is already known, it should be passed in,
as this is by far the most expensive calculation.
"""
xp, yp = get_polar_motion(time)
sp = erfa.sp00(*get_jd12(time, 'tt'))
pmmat = erfa.pom00(xp, yp, sp)
# n... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#tete_to_itrs_mat | 1 | |
Python | rbpn = erfa.pnm06a(*get_jd12(tete_coo.obstime, 'tt'))
newrepr = tete_coo.cartesian.transform(matrix_transpose(rbpn))
# We now have a GCRS vector for the input location and obstime.
# Turn it into a GCRS frame instance.
loc_gcrs = get_location_gcrs(tete_coo.location, tete_coo.obstime,
... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#tete_to_gcrs | 1 | |
Python | tete_coo2 = tete_coo.transform_to(TETE(obstime=itrs_frame.obstime,
location=EARTH_CENTER))
# now get the pmatrix
pmat = tete_to_itrs_mat(itrs_frame.obstime)
crepr = tete_coo2.cartesian.transform(pmat)
return itrs_frame.realize_frame(crepr) | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#tete_to_itrs | 1 | |
Python | pmat = tete_to_itrs_mat(itrs_coo.obstime)
newrepr = itrs_coo.cartesian.transform(matrix_transpose(pmat))
tete = TETE(newrepr, obstime=itrs_coo.obstime)
# now do any needed offsets (no-op if same obstime)
return tete.transform_to(tete_frame) | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#itrs_to_tete | 1 | |
Python | pmat = gcrs_to_cirs_mat(cirs_coo.obstime)
newrepr = cirs_coo.cartesian.transform(matrix_transpose(pmat))
# We now have a GCRS vector for the input location and obstime.
# Turn it into a GCRS frame instance.
loc_gcrs = get_location_gcrs(cirs_coo.location, cirs_coo.obstime,
... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#cirs_to_gcrs | 1 | |
Python | cirs_coo2 = cirs_coo.transform_to(CIRS(obstime=itrs_frame.obstime,
location=EARTH_CENTER))
# now get the pmatrix
pmat = cirs_to_itrs_mat(itrs_frame.obstime)
crepr = cirs_coo2.cartesian.transform(pmat)
return itrs_frame.realize_frame(crepr) | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#cirs_to_itrs | 1 | |
Python | pmat = cirs_to_itrs_mat(itrs_coo.obstime)
newrepr = itrs_coo.cartesian.transform(matrix_transpose(pmat))
cirs = CIRS(newrepr, obstime=itrs_coo.obstime)
# now do any needed offsets (no-op if same obstime)
return cirs.transform_to(cirs_frame) | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#itrs_to_cirs | 1 | |
Python | """Utility function used currently only by _init_from_coldefs
to help convert columns from binary format to ASCII format or vice
versa if necessary (otherwise performs a straight copy).
"""
if isinstance(column.format, self._col_format_cls):
# This column has a FITS format c... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#_copy_column | 0 | |
Python | """Output help documentation for the specified unified I/O ``format``.
By default the help output is printed to the console via ``pydoc.pager``.
Instead one can supplied a file handle object as ``out`` and the output
will be written to that handle.
Parameters
----------
... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#help | 0 | |
Python | """
Rename a mixin column.
"""
t = QTable(mixin_cols)
tc = t.copy()
t.rename_column('m', 'mm')
assert t.colnames == ['i', 'a', 'b', 'mm']
if isinstance(t['mm'], table_helpers.ArrayWrapper):
assert np.all(t['mm'].data == tc['m'].data)
elif isinstance(t['mm'], coordinates.SkyCoord)... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#test_rename_mixin_columns | 0 | |
Python | def setup(self):
s = SphericalRepresentation(lon=[0., 6., 21.] * u.hourangle,
lat=[0., -30., 85.] * u.deg,
distance=[1, 2, 3] * u.kpc)
self.s = s
self.r = s.represent_as(RadialRepresentation)
self.e = s.unit_vectors(... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#TestRadialDifferential | 0 | |
Python | """
A coordinate or frame in the International Terrestrial Reference System
(ITRS). This is approximately a geocentric system, although strictly it is
defined by a series of reference locations near the surface of the Earth.
For more background on the ITRS, see the references provided in the
:ref:`... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#ITRS | 1 | |
Python | _required_columns = None
_required_columns_enabled = True
# If _required_column_relax is True, we don't require the columns to be
# present but we do require them to be the correct ones IF present. Note
# that this is a temporary state - as soon as the required columns
# are all present, we toggle ... | A direct approach to ITRS to Observed transformations that stays within the ITRS.
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be s... | astropy_6500928dc0e57be8f06d1162eacc3ba5e2eff692#BaseTimeSeries | 0 | |
Python | """Write Cosmology using ``.write()``."""
return cosmo.write | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """Write Cosmology to file using function ``write``."""
def use_write(*args, **kwargs):
return self.functions["write"](cosmo, *args, **kwargs)
return use_write | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | return self.view(np.ndarray).argmin(axis, out=out) | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#argmin | 0 | |
Python | with pytest.raises(ValueError):
x = u.Unit('1000 erg/(s cm**2 Angstrom)', format='fits')
with pytest.raises(ValueError):
x = u.Unit('12 erg/(s cm**2 Angstrom)', format='fits')
x = u.Unit(1.2 * u.erg)
with pytest.raises(ValueError):
x.to_string(format='fits')
x = u.Unit(100.0 *... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#test_fits_scale_factor_errors | 0 | |
Python | assert u.m > u.cm
assert u.m >= u.cm
assert u.cm < u.m
assert u.cm <= u.m
with pytest.raises(u.UnitsError):
u.m > u.kg | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#test_comparison | 0 | |
Python | return (a.view(np.ndarray),), {}, a.unit ** a.shape[-1], None | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#det | 0 | |
Python | try:
s = cls.to_string(unit)
except core.UnitScaleError:
scale = unit.scale
unit = copy.copy(unit)
unit._scale = 1.0
return f'{cls.to_string(unit)} (with data multiplied by {scale})'
return s | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#_to_decomposed_alternative | 0 | |
Python | """
Convert a floating-point degree value into a ``(degree, arcminute,
arcsecond)`` tuple.
"""
sign = np.copysign(1.0, d)
(df, d) = np.modf(np.abs(d)) # (degree fraction, degree)
(mf, m) = np.modf(df * 60.) # (minute fraction, minute)
s = mf * 60.
return np.floor(sign * d), sign * np... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#degrees_to_dms | 0 | |
Python | data = np.array([-np.inf, 0.00, 0.25, 0.50, 0.75, 1.00, np.inf])
result = np.array([0.0, 0.0, 0.25, 0.5, 0.75, 1.0, 1.0])
assert_equal(HistEqStretch(data)(data), result)
assert_equal(InvertedHistEqStretch(data)(data), result) | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#test_histeqstretch_invalid | 0 | |
Python | """
Write the current ConfigObj as a file
tekNico: FIXME: use StringIO instead of real files
>>> filename = a.filename
>>> a.filename = 'test.ini'
>>> a.write()
>>> a.filename = filename
>>> a == ConfigObj('test.ini', raise_errors=True)
1
>>> imp... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | nbytes = super().write(buffer)
if nbytes == 0:
raise ValueError("This writer does not allow empty writes")
return nbytes | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Recursively iterate over all COOSYS_ elements in the VOTABLE_
file.
"""
yield from self.coordinate_systems
for resource in self.resources:
yield from resource.iter_coosys() | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#iter_coosys | 0 | |
Python | if self.simulateonly:
return
if hasattr(self._file, 'write'):
_write_string(self._file, string) | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | del self.hdus | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#teardown_class | 0 | |
Python | """
Write the given data to the stream.
Parameters
----------
data : ndarray
Data to stream to the file.
Returns
-------
writecomplete : int
Flag that when `True` indicates that all of the required
data has been written to the... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Write out data.
Parameters
----------
data : object
The data to write.
*args
The arguments passed to this method depend on the format.
format : str or None
**kwargs
The arguments passed to this method depend on the format.
... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Write header information in the ECSV ASCII format.
This function is called at the point when preprocessing has been done to
convert the input table columns to `self.cols` which is a list of
`astropy.io.ascii.core.Column` objects. In particular `col.str_vals`
is available for... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | raise NotImplementedError | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | self._check_multidim_table(table)
lines = _write_table_qdp(table, err_specs=self.err_specs)
return lines | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | if 'col_align' not in self.latex:
self.latex['col_align'] = len(self.cols) * 'c'
if 'tablealign' in self.latex:
align = '[' + self.latex['tablealign'] + ']'
else:
align = ''
if self.latex['tabletype'] is not None:
lines.append(r'\begin{' + self.lat... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | add_dictval_to_list(self.latex, 'data_start', lines)
core.BaseData.write(self, lines)
add_dictval_to_list(self.latex, 'data_end', lines)
lines.append(self.data_end)
add_dictval_to_list(self.latex, 'tablefoot', lines)
if self.latex['tabletype'] is not None:
lines.appen... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | self.header.start_line = None
self.data.start_line = None
return core.BaseReader.write(self, table=table) | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | if 'col_align' not in self.latex:
self.latex['col_align'] = len(self.cols) * 'c'
if 'tablealign' in self.latex:
align = '[' + self.latex['tablealign'] + ']'
else:
align = ''
lines.append(r'\begin{' + self.latex['tabletype'] + r'}{' + self.latex['col_align'] + ... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | lines.append(self.data_start)
lines_length_initial = len(lines)
core.BaseData.write(self, lines)
# To remove extra space(s) and // appended which creates an extra new line
# in the end.
if len(lines) > lines_length_initial:
lines[-1] = re.sub(r'\s* \\ \\ \s* $', '', l... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | lines = super().write(lines)
lines = [lines[1]] + lines + [lines[1]]
return lines | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """Not available for the CDS class (raises NotImplementedError)"""
raise NotImplementedError | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Use a fast Cython method to write table data to output,
where output is a filename or file-like object.
"""
self._write(table, output, {}) | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Override the default write method of `FastBasic` to
output masked values as empty fields.
"""
self._write(table, output, {'fill_values': [(core.masked, '')]}) | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Override the default writing behavior in `FastBasic` so
that columns names are not included in output.
"""
self._write(table, output, {}, header_output=None) | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Override the default writing behavior in `FastBasic` so
that column names are commented.
"""
self._write(table, output, {}, header_output='comment') | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Override the default writing behavior in `FastBasic` to
output a line with column types after the column name line.
"""
self._write(table, output, {}, output_types=True) | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | if self.start_line is not None:
for i, spacer_line in zip(range(self.start_line),
itertools.cycle(self.write_spacer_lines)):
lines.append(spacer_line)
lines.append(self.splitter.join([x.info.name for x in self.cols])) | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """Write ``self.cols`` in place to ``lines``.
Parameters
----------
lines : list
List for collecting output of writing self.cols.
"""
if hasattr(self.start_line, '__call__'):
raise TypeError('Start_line attribute cannot be callable for write()')
e... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Write ``table`` as list of strings.
Parameters
----------
table : `~astropy.table.Table`
Input table data.
Returns
-------
lines : list
List of strings corresponding to ASCII table
"""
# Check column names before alt... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 | |
Python | """
Writes the Header of the MRT table, aka ReadMe, which
also contains the Byte-By-Byte description of the table.
"""
from astropy.coordinates import SkyCoord
# Recognised ``SkyCoord.name`` forms with their default column names (helio* require SunPy).
coord_systems = {'... | ASCII table output to HTML does not support supplied "formats"
<!-- This comments are hidden when you submit the issue,
so you do not need to remove them! -->
<!-- Please be sure to check out our contributing guidelines,
https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md .
Please be sure to check out ou... | astropy_19cc80471739bcb67b7e8099246b391c355023ee#write | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.