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

Allow sample rate to be read in from filename #112

Open
samyk opened this issue Dec 19, 2016 · 8 comments
Open

Allow sample rate to be read in from filename #112

samyk opened this issue Dec 19, 2016 · 8 comments

Comments

@samyk
Copy link
Contributor

samyk commented Dec 19, 2016

Suggestion: It would be nice if the sample rate could be stored/read in from a filename. I often store it in the filename anyway, and it would be an easy way to transfer it around. Eg, pulling out /-(\d+)([mkbg]?)sps/i and calculating it from there.

@miek
Copy link
Owner

miek commented Dec 19, 2016

This already happens for the default filenames coming from osmocom_fft, see #80

@samyk
Copy link
Contributor Author

samyk commented Dec 19, 2016

Ah, nice, but that only seems to work for .cfile's. It would be nice for other formats to support this as well. Additionally, a tooltip when rolling over 'Sample rate' stating how to use it would be useful to explain it.

@schneider42
Copy link
Collaborator

Yes, it only works for files which end in .cfile. I think we can drop that limitation.

@battlesnake
Copy link
Contributor

battlesnake commented Mar 12, 2017

Audacity attempts to guess input format and 90% of the time gets it wrong, in addition to having an annoying limit on sample rate, which is how I came across Inspectrum.

I'm also supportive of reading some info (e.g. sample rate, sample format) from the filename, and ideally allowing the user to provide a list of multiple regexes for parsing filenames, rather than attempting to guess like Audacity or to use a hardcoded format.

I may be able to work on this two weeks from now if nobody has a problem with it.

@dkozel
Copy link

dkozel commented Mar 13, 2017

SigMF is trying to make an open source standard for signal file metadata.
https://github.com/gnuradio/SigMF/blob/master/sigmf-spec.md

@garverp
Copy link

garverp commented Mar 14, 2017

GNURadio also has a metadata format [1] with sample rate, center frequency, data type, timestamps, etc. On file load could look for an associated GR header, read sample rate, center frequency, and data type. Then plot timestamps...

PWG

[1] http://gnuradio.org/doc/doxygen/page_metadata.html

@battlesnake
Copy link
Contributor

I think these are two separate approaches, which probably deserve separate issues:

  1. Reading metadata from a separate side-car file.

  2. Reading metadata from the raw data file's filename.

@sm0yyq
Copy link

sm0yyq commented Mar 3, 2020

Cant say i don't get any sample rate from my complex32s files, but maybe i shoulden't either?

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

No branches or pull requests

7 participants