Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for #230, i.e. the treatment of the time_range / seconds_range / time_within options.
Background info:
peaklet_classification
orcorrected_areas
and (b) data that is never stored, such as peaks, or the temporary datatypes that are made to merge e.g.peaks
andpeak_basics
if you load them together.peaks
). It will then use the latter to map the time range to row numbers, which can be selected in the no-time datatypes.There were two bugs:
peaks
together with a time-bearing datatype of the same kind, such aspeak_basics
,peaks
still has to be reconstructed frompeaklets
andmerged_s2s
. However, the time range was not passed on to the latter, so strax attempted to load the full data in the run, starting with the first chunk, which would usually cause a merge failure. (... but not always; due to the very coarse chunk mapping you were fine if the run only had one chunk or perhaps if you were just loading the first chunk.)Now:
time_range
is specified, it will apply to all data types that are loaded. There are likely still cases where the current logic fails, e.g. when you make some deep chain of no-time-bearing and never-stored plugins. Then you will get a neater error: it will say which data type it tried in vain to find time information for (rather than a weird merge failure or blowing up your memory)._time_range_to_n_range
has been renamed totime_range_to_row_range
for clarify._chunk_number
is added toget_array
,get_df
, etc, to load just a single chunk. This is used internally intime_range_to_row_range
.Taking a step back, this is all additional complexity that comes from supporting data types without time information (see also #79). If I knew how much trouble this would have brought I would never have supported it -- it saves a bit of space, but not so much. However, by now, it is probably too big of a downstream change to stop supporting this.