litmus.lightcurve
Bases: object
A wrapper class for lightcurves. Construct /w array-like inputs for time, signal and error (optional) like: lightcurve(T, Y, E) or: lightcurve(T, Y) Which yields E=0 for all {T,Y}
Supports array-like addition and float-like addition / multiplication
Source code in litmus/lightcurve.py
38 39 40 41 42 43 44 45 46 47 48 49 |
|
T = np.array(T, dtype=np.float64)
instance-attribute
Y = np.array(Y, dtype=np.float64)
instance-attribute
E = np.zeros_like(T)
instance-attribute
normalized = False
instance-attribute
keys() -> [str, str, str]
Returns the string-like names of the lightcurve's attributes
Source code in litmus/lightcurve.py
120 121 122 123 124 |
|
values() -> (_types.ArrayN, _types.ArrayN, _types.ArrayN)
Returns the lightcurves' value series' in the order of keys
Source code in litmus/lightcurve.py
126 127 128 129 130 |
|
normalize() -> _types.Self
Esimates the mean and amplitude of the lighturve assuming uncorrelated measurements Returns a lightcurve object with this normalization
Source code in litmus/lightcurve.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
|
unnormalize() -> _types.Self
Reverses the effects of lightcurve.normalize(). Returns a lightcurve object with mean and amplitude prior to normalize()
Source code in litmus/lightcurve.py
193 194 195 196 197 198 199 200 201 202 203 204 |
|
delayed_copy(lag=0.0, Tmin=None, Tmax=None) -> _types.Self
Returns a copy subsampled to only datapoints in the domain T in [Tmin,Tmax] and offset by lag
Source code in litmus/lightcurve.py
206 207 208 209 210 211 212 213 214 215 216 217 |
|
trimmed_copy(Tmin=None, Tmax=None) -> _types.Self
Returns a copy subsampled to only datapoints in the domain T in [Tmin,Tmax]
Source code in litmus/lightcurve.py
219 220 221 222 223 |
|
plot(axis=None, show=True, **kwargs) -> None
Plots an errorbar series to a matplotlib axis. If show=True, will plt.show() after plotting. If axis is None, will create a new figure. Pass in any plotting kwargs for plt.errorbar at **kwargs
Source code in litmus/lightcurve.py
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
copy()
Source code in litmus/lightcurve.py
250 251 |
|