obiwan.dplearn.split_testtrain

Functions

get_data(f, keys) Returns numpy array of shape [len(keys),64,64,6]
write_traintest(brick, real_dir, sim_dir, …) Writes xtrain_1.npy,xtest_1.npy,…
obiwan.dplearn.split_testtrain.get_data(f, keys)[source]

Returns numpy array of shape [len(keys),64,64,6]

Parameters:f – hdf5 file object
obiwan.dplearn.split_testtrain.write_traintest(brick, real_dir, sim_dir, save_dir, n_train=256, n_test=64)[source]

Writes xtrain_1.npy,xtest_1.npy,… for a given brick

Parameters:
  • brick – brickname
  • real_dir – path to hdr5 dir for real galaxies
  • sim_dir – … simulated galaxies
  • save_dir – where to write the bri/brick/xtrain.npy, …, files