Skip to content

Creating DynamicSpectrum with one bin in frequency or time #34

@JacksonJMB

Description

@JacksonJMB

Currently an error is thrown DynamicSpectrum object when the selected frequency or time range covers only one bin, which results from

120 self.time_res = (self.time[1] - self.time[0]) * self.tunit
121 self.freq_res = (self.freq[1] - self.freq[0]) * u.MHz
122 self.header.update(
123     {
124         "time_resolution": f"{self.time_res.to(u.s):.3f}",
125         "freq_resolution": f"{self.freq_res.to(u.MHz):.2f}",
126     }
127 )

in DynamicSpectrum.__post_init__. Fixing this would allow creation of a lightcurve for a single frequency bin or a spectrum for a single time bin.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions