Skip to content

Commit 04a30a2

Browse files
committed
Tidy up comments a little.
1 parent 18015dc commit 04a30a2

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

imsim/photon_pooling.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -344,18 +344,7 @@ def make_photon_subbatches(batch, nsubbatch):
344344
# sub-batches are empty.
345345
sorted_objects = sorted(batch, key=lambda obj: obj.phot_flux, reverse=True)
346346

347-
# Implementation goal: (at the moment have something like 1 -5)
348-
# 0. Sort objects brightest to faintest.
349-
# 1. Loop first through objects and then while object's remaining flux > 0.
350-
# 2. Does this object's remaining flux fit entirely into the current sub-batch? If yes, put it in.
351-
# 3. If not, are there are still any empty sub-batches AND would we expect it to fit into one?
352-
# 4. If yes, move to the next empty sub-batch and put it in. Decrement the number of empty sub-batches.
353-
# 5. If not, then we now need to place the objects in partially full sub-batches and potentially fragment them. Exit the loop, noting current object.
354-
# 6. Loop through the remaining objects.
355-
# 7. Loop while the object's remaining flux > 0.
356-
# 8. Find the least full sub-batch. (Store total flux in each somewhere instead?)
357-
# 9. Add the object up to max(1.1 * its current flux, 1.1 * photons_per_subbatch), or some other tolerance.
358-
347+
# Sub-batching loop.
359348
subbatches = [[] for _ in range(nsubbatch)]
360349
current_subbatch = 0
361350
for obj in sorted_objects:

0 commit comments

Comments
 (0)