Open ConnorStoneAstro opened 1 year ago
I'd recommend using the functionality already built into torch for this kind of thing: in particular Dataset
s for storing the data and DataLoader
s for iterating through the data in various ways. And actually, I've already written one for HDF5 files as well as PROBES and Illustris-specific datasets that should cover a fair chunk of what's needed.
The main missing piece compared to what you're suggesting is downloading functionality. For consistency, I'd take a look at the MNIST
dataset in torchvision, which has an init argument indicating whether or not to download the dataset.
For prototyping it would be useful to have a caustic built-in system to sample reasonable source images. The github could store the PROBES sample and there could be a method in caustic to draw a random PROBES galaxy. This would download an HDF5 file (first time its called) with the PROBES sample, then randomly select one, and sample it at the desired resolution.