log.warning('No transittimespecified. Using transittimeat max power')ifnotisinstance(transit_time, Time): transit_time = Time(transit_time, format=self.time.format, scale=self.time.scale)returnself._BLS_object.compute_stats(u.Quantity(period,'d').value, u.Quantity(duration,'d').value, tra...
self.last_change = time.asctime() def print_changes(self): print 'Changelog for Slate object:' for k, v in self.history.items(): print '%st %s' % (k, v) def __getstate__(self): # 故意不返回self.value 或 self.last_change. #当unpickle,我们希望有一块空白的"slate" return self...
Description I have a Table with a column containing Time objects. I want to sort the rows by that column with Time objects. I get AttributeError: 'Time' object has no attribute 'view' error. Same error using QTable. I found #8068 but in ...
我们的例子是 Slate 类,它会记忆它曾经的值和已经写入的值。 然而,当这特殊的 slate 每一次 pickle 都会被清空:当前值不会被保存。import timeclass Slate:'''存储一个字符串和一个变更log,当Pickle时会忘记它的值'''def __init__(self, value):self.value = valueself.last_change = time ...
Description Creating a regularly space set of Time objects with np.linspace is quite slow: from astropy.time import Time, TimeDelta import astropy.units as u import numpy as np dt = TimeDelta(1 * u.hour) t0 = Time('2021-01-01') t1 = Time...
#Problem calculating distance to object in the sky#worse when close to observer. Negligible if distance > 100 kmfromastropy.timeimportTimefromastropyimportunitsasufromastropy.coordinatesimportEarthLocation, AltAzobs_lon =0*u.degobs_lat =0*u.degobs_alt =0*u.maircraft_lon =0*u.degaircraft_...
一、效果图 弹跳加载 二、实现代码 <view class="bouncing-loader"> <view></view> <view><...
RuntimeError("There were not valid sources in your search") 开发者ID:threeML,项目名称:threeML,代码行数:38,代码来源:VirtualObservatoryCatalog.py 示例11: map_dapall ▲点赞 4▼ # 需要导入模块: import astropy [as 别名]# 或者: from astropy importtable[as 别名]defmap_dapall(header, row):'...
In [2]: t = Time([1, 2], format="cxcsec") In [3]: t.mask[0] = True In [4]: t Out[4]: <Time object: scale='tt' format='cxcsec' value=[--, 2.]> which should be combinable to: In [2]: t = Time([1, 2], format="cxcsec") In [3]: t.mask[0] = True In...
astropy.time The astropy_time attribute and time format has been removed from the public interface. Existing code that instantiates a new time object using format='astropy_time' can simply omit the format specification. [#3857] astropy.units Single-item Quantity instances with record dtype will...