Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Add generic dtcwt.sampling.{rescale,sample}_subbands functions #92

Closed
rjw57 opened this issue Feb 11, 2014 · 6 comments · Fixed by #95
Closed

Add generic dtcwt.sampling.{rescale,sample}_subbands functions #92

rjw57 opened this issue Feb 11, 2014 · 6 comments · Fixed by #95
Milestone

Comments

@rjw57
Copy link
Owner

rjw57 commented Feb 11, 2014

Sometimes one may want to sample from or rescale only specific subbands. Add dtcwt.sampling.{rescale,sample}_subbands functions which dtcwt.sampling.{rescale,sample}_highpass then become special cases of. E.g.:

sbs = [0,2,4] # valid values are integers on the interval [0, 6)
rescaled_sbs = dtcwt.sampling.rescale_subbands(lena_t.highpasses[-1][:,:,sbs],
    sbs, lena.shape)
@rjw57 rjw57 added this to the 0.10.0 milestone Feb 11, 2014
@rjw57 rjw57 self-assigned this Feb 11, 2014
@rjw57
Copy link
Owner Author

rjw57 commented Feb 11, 2014

Arose in comments of #90.

@scf32
Copy link
Contributor

scf32 commented Feb 11, 2014

Yes, I think this is what I need. As it stands (and assuming I'm using it correctly), I have a set of locations to sample from which are unique to a given subband, but the function does the rotation/sampling/rotation for every subband and I throw 5/6ths of these samples away.

@rjw57
Copy link
Owner Author

rjw57 commented Feb 11, 2014

Super. Do you want to take a crack at it or shall I? If you want a go, I'll see if there's any sensible way to assign you. (If not, I'll just de-assign myself.)

@scf32
Copy link
Contributor

scf32 commented Feb 11, 2014

I can try; it's only fair considering I'm the one that needs this functionality.

@rjw57
Copy link
Owner Author

rjw57 commented Feb 11, 2014

Have a go then. I may review for style but the quickest way to write code is not to have to do it :).

@rjw57 rjw57 removed their assignment Feb 11, 2014
@rjw57
Copy link
Owner Author

rjw57 commented Feb 11, 2014

(Don't forget to add some tests. dtcwt.sampling is woefully under-tested as it is... :S.)

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

Successfully merging a pull request may close this issue.

2 participants