Dataset Viewer
Auto-converted to Parquet Duplicate
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
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
35