PothosCore icon indicating copy to clipboard operation
PothosCore copied to clipboard

Sugestion to scale some Label data when decimating or interpreting

Open ashley-b opened this issue 5 years ago • 2 comments

I was thinking it would be useful if rate transforming blocks i.e. decimating/interpolating filter could also scale some label data like "rxRate" and perhaps other user labels. This could be done though a registry of labels to scale or a flag in the label maybe?

https://github.com/pothosware/PothosComms/blob/61d10f4d2c0523906207e91ec02ac86f6658653a/filter/FIRFilter.cpp#L307-L314

ashley-b avatar Mar 30 '19 04:03 ashley-b

I havent thought deeply about making some tag registry, but I did make this specific FIR block adjust the rate when passed in with the rxRate id specifically :-)

guruofquality avatar May 26 '19 03:05 guruofquality

Great, thanks for that. I will checkout it out.

I was thinking after I posted this sugestion that perhaps "rxRate" Label value should be transform in Label::toAdjusted method, so all new rate transforming blocks get this for free. But I have noticed its also used to shift labels due to data type transformation not just rate transforms.

As for a way to signal if a Label value should be adjusted, maybe a flag in the Label class would be the easiest way. So that a block adding labels (e.g SDR source) can set it, if it needs the value to be adjusted downstream.

Thanks again.

ashley-b avatar May 29 '19 12:05 ashley-b