slaclab / pysmurf

Other
2 stars 9 forks source link

speed up make_freq_mask #663

Closed jlashner closed 3 years ago

jlashner commented 3 years ago

Issue

This PR should greatly speed up the creation of frequency mask by changing the required number of epics get requests from being proportional to the number of channels to being proportional to the number of bands. This use to take ~minutes for a full UFM. Resolves #662 .

This has not been tested yet, so I'll test when we have a cold system available (or someone else on SO can test before then) and then we can switch this from a draft to a full PR when it works.

Description

The current implementation of this function makes a number of epics requests for each channel, which takes a very long time when there are a lot of channels. The new version uses the centerFrequencyArray registers etc. to get info for all channels in a given band at once, which should speed it up a lot.

Does this PR break any interface?

jlashner commented 3 years ago

Just tested on smurf-srv20 and confirmed the freq mask generated by this branch is the same, while greatly speeding up its generation.

jlashner commented 3 years ago

Alright, docstrings are fixed!