There's an obvious use-case for tools to iterate over SWIFTGalaxy objects in parallel. This was omitted from the initial SWIFTGalaxies PR for simplicity but implementing some parallelization tools on top of SWIFTGalaxies should be high on the to-do list. Some initial thoughts carried over from the SWIFTGalaxies development process:
There's an obvious use-case for tools to iterate over
SWIFTGalaxyobjects in parallel. This was omitted from the initialSWIFTGalaxiesPR for simplicity but implementing some parallelization tools on top ofSWIFTGalaxiesshould be high on the to-do list. Some initial thoughts carried over from theSWIFTGalaxiesdevelopment process:SWIFTGalaxies.split(n)to return a list ofnSWIFTGalaxiesinstances each with a fraction approx1/nof the ensemble of target regions (where each region could contain many target galaxies). This can easily be farmed out to multiple processes (maybe aSWIFTGalaxies.sub(n, N)approach makes more sense so that each process gets a copy-on-write instance and then picks out its own share?). Some cookbook examples useful here.mapwithsplit(orsub) to offer some parallelization built in.map. Things like some kind of queue, or asynchronous access to results as they arrive.