Closed sambelltacq closed 1 month ago
Hello Sam
This patch too cryptic.
MINOR issue: (total_channels % 2 > 0) could be total_channels%2 but that's not really the problem, the problem is that you're building up something to tear it down again.
I think something like this would be clearer, because it states directly what you're trying to achieve:
data_col32 = 0 for site in uut.sites: data_col32 += int(uut.svc['s{s}'].NCHAN) // (1 if uut.svc['s{s}'].data32 == 1 else 2)
And, yes, there probably should be better syntax for "uut.svc['s{s}']"
Cheers
Peter
On Fri, 4 Oct 2024 at 16:20, sambelltacq @.***> wrote:
modified: HAPI/hts_multistream.py
You can view, comment on, or merge this pull request online at:
https://github.com/D-TACQ/AFHBA404/pull/125 Commit Summary
- 55a3c2e https://github.com/D-TACQ/AFHBA404/pull/125/commits/55a3c2edac396f56326963f4bdc18a9f30397cd1 Fixed error with incorrect values passed to
File Changes
(1 file https://github.com/D-TACQ/AFHBA404/pull/125/files)
- M HAPI/hts_multistream.py https://github.com/D-TACQ/AFHBA404/pull/125/files#diff-a5a5d936608328ceca7187ee6a88659922a79c4ba4af82a5de7f01bcf93fc95d (5)
Patch Links:
— Reply to this email directly, view it on GitHub https://github.com/D-TACQ/AFHBA404/pull/125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXGPE43ZPBUESP3IKBHT2DZZ2W2FAVCNFSM6AAAAABPMDCP3KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3DMNRSGY3TOOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Peter Milne, Director of Sales www.d-tacq.com
for s in uut.get_aggregator_sites(): svc = uut.modules[int(s)] data_col32 += int(svc.NCHAN) // (1 if svc.data32 == '1' else 2)
On Fri, 4 Oct 2024 at 17:08, Peter Milne @.***> wrote:
Hello Sam
This patch too cryptic.
MINOR issue: (total_channels % 2 > 0) could be total_channels%2 but that's not really the problem, the problem is that you're building up something to tear it down again.
I think something like this would be clearer, because it states directly what you're trying to achieve:
data_col32 = 0 for site in uut.sites: data_col32 += int(uut.svc['s{s}'].NCHAN) // (1 if uut.svc['s{s}'].data32 == 1 else 2)
And, yes, there probably should be better syntax for "uut.svc['s{s}']"
Cheers
Peter
On Fri, 4 Oct 2024 at 16:20, sambelltacq @.***> wrote:
modified: HAPI/hts_multistream.py
You can view, comment on, or merge this pull request online at:
https://github.com/D-TACQ/AFHBA404/pull/125 Commit Summary
- 55a3c2e https://github.com/D-TACQ/AFHBA404/pull/125/commits/55a3c2edac396f56326963f4bdc18a9f30397cd1 Fixed error with incorrect values passed to
File Changes
(1 file https://github.com/D-TACQ/AFHBA404/pull/125/files)
- M HAPI/hts_multistream.py https://github.com/D-TACQ/AFHBA404/pull/125/files#diff-a5a5d936608328ceca7187ee6a88659922a79c4ba4af82a5de7f01bcf93fc95d (5)
Patch Links:
— Reply to this email directly, view it on GitHub https://github.com/D-TACQ/AFHBA404/pull/125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXGPE43ZPBUESP3IKBHT2DZZ2W2FAVCNFSM6AAAAABPMDCP3KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3DMNRSGY3TOOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Peter Milne, Director of Sales www.d-tacq.com
-- Peter Milne, Director of Sales www.d-tacq.com
data_col32 for svc in uut.get_aggregator_svc_list(): data_col32 += int(svc.NCHAN) // (1 if svc.data32 == '1' else 2)
needs a HAPI update: To github.com:D-TACQ/acq400_hapi.git f62b845..0d1340d master -> master
On Fri, 4 Oct 2024 at 17:14, Peter Milne @.***> wrote:
for s in uut.get_aggregator_sites(): svc = uut.modules[int(s)] data_col32 += int(svc.NCHAN) // (1 if svc.data32 == '1' else 2)
On Fri, 4 Oct 2024 at 17:08, Peter Milne @.***> wrote:
Hello Sam
This patch too cryptic.
MINOR issue: (total_channels % 2 > 0) could be total_channels%2 but that's not really the problem, the problem is that you're building up something to tear it down again.
I think something like this would be clearer, because it states directly what you're trying to achieve:
data_col32 = 0 for site in uut.sites: data_col32 += int(uut.svc['s{s}'].NCHAN) // (1 if uut.svc['s{s}'].data32 == 1 else 2)
And, yes, there probably should be better syntax for "uut.svc['s{s}']"
Cheers
Peter
On Fri, 4 Oct 2024 at 16:20, sambelltacq @.***> wrote:
modified: HAPI/hts_multistream.py
You can view, comment on, or merge this pull request online at:
https://github.com/D-TACQ/AFHBA404/pull/125 Commit Summary
- 55a3c2e https://github.com/D-TACQ/AFHBA404/pull/125/commits/55a3c2edac396f56326963f4bdc18a9f30397cd1 Fixed error with incorrect values passed to
File Changes
(1 file https://github.com/D-TACQ/AFHBA404/pull/125/files)
- M HAPI/hts_multistream.py https://github.com/D-TACQ/AFHBA404/pull/125/files#diff-a5a5d936608328ceca7187ee6a88659922a79c4ba4af82a5de7f01bcf93fc95d (5)
Patch Links:
— Reply to this email directly, view it on GitHub https://github.com/D-TACQ/AFHBA404/pull/125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXGPE43ZPBUESP3IKBHT2DZZ2W2FAVCNFSM6AAAAABPMDCP3KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3DMNRSGY3TOOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Peter Milne, Director of Sales www.d-tacq.com
-- Peter Milne, Director of Sales www.d-tacq.com
-- Peter Milne, Director of Sales www.d-tacq.com