Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downsampling of the event segment, while saving in the metadata. #115

Closed
Pratyma opened this issue Dec 2, 2022 · 5 comments
Closed

Downsampling of the event segment, while saving in the metadata. #115

Pratyma opened this issue Dec 2, 2022 · 5 comments
Assignees

Comments

@Pratyma
Copy link

Pratyma commented Dec 2, 2022

Recently, when I tried to extract one of the events from the metadata (sqlite database), I found that the time series in the event was downsampled by almost a factor of 30. I have 15000 samples for the same event in my signal, but the extract from metadata has only 499 samples. The shape of the event's waveform is preserved. Both of them look exactly the same.

@abalijepalli
Copy link
Member

I can't seem to reproduce this. Below are screenshots of two representative events. The blue trace is the raw data and the orange is from the database. They seem to overlap perfectly with no evidence of downsampling. Could you post similar screenshots of what you observe?

Figure_1

Figure_1
Figure_2

@Pratyma
Copy link
Author

Pratyma commented Dec 5, 2022

Now, I am also getting the same number of samples from metadata's time series, when I directly extracted. But previously, the events were extracted from mosaic_plot/mosaicAnalysis/analysisTimeSeries.py, which also uses the same sqlite database.

@abalijepalli
Copy link
Member

I don't have that file. Is this in the repository? If so could you post a link to the code?

@Pratyma
Copy link
Author

Pratyma commented Dec 6, 2022

Apology for the wrong file name, it is mosaicweb/mosaicAnalysis/analysisTimeSeries.py.

I think I also found why decimation occurs. I think it is due to line 106-110 in mosaicweb/mosaicAnalysis/analysisTimeSeries.py.

def _calculateDecimation(self, dataLen): if dataLen < 1000: return 1 else: return int(round(dataLen/500.))

Therefore, it was not a bug. I missed the above-mentioned function. Sorry for the misunderstanding.

@abalijepalli
Copy link
Member

That is only used when displaying long time series in the user interface. I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants