GalSim-developers/GalSim — pull request #295 by rmjarvis (2012-10-10 17:59:15+00:00)
Title: #291 More improvements to config stuff

I've added a bit more to the config machinery here. Basically I've made it so all the multi-object demo script work with multiple processes now. To verify that, I've added nproc=4 to most of the demo scripts temporarily. These aren't intended to remain there, since they aren't usually pedagogically useful. But for now, they were helpful to test the functionality.

- Fixed pickling issues related to Image, Bounds, RealGalaxyCatalog, ... (maybe others)
- Fixed synchronization issues for sequences, so they are based on the running file/image/object counts rather than using a stored temporary variable (which doesn't work with multiple processes).
- Changed the Ring test specification from a kind of Shear to a kind of GSObject. This allows for a lot more flexibility for the "first" item in each ring.
- Make the Ring test work with multiple processes by having each full ring be done by a single process (so it has access to the "first" object).
- Add the new Ring test to demo10, which hadn't been possible before.
- Add an option to have a Ring test span 360 degrees rather than 180 degrees. This is relevant for demo10, since these are RealGalaxy objects, which aren't rotationally symmetric. So you'd probably want to have them go all the way around rather than just half way.
- Add the ability to have the stamps for a Tiled image be generated in a random order. This is used in demo10 now.
- Add an optional top level field called eval_variables which are usable by any Eval item in the file. I added an example of this to demo10, but a more salient example of why it is useful is found in example/shear_test1.yaml.
- Add a -v flag to the galsim_yaml and galsim_json executables, and generally improve the help information for them. (e.g. galsim with no arguments gives a nice message about how to run the program). Thanks, Barney!
- Other minor tweaks like adding nitems as an option for Sequence instead of last, add RTheta as a pos_value type. Maybe others like that.

If you want to see the functionality I was actually aiming for in this branch, you can look at the file examples/shear_test1.yaml. This makes bunch of images at different resolutions, ellipticities, and galaxy profiles at S/N = 200 with a single applied shear. I'm planning on using this to work on my shear measurement code. So it's nice that GalSim is now fully capable of making that kind of set of images with a fairly straightforward config file. :)