chunk_sky_model¶
Functions to take a WODEN sky model and break it up (chunk) into a number of smaller sky models, to distribute the processing across the GPU.
Functions
-
void null_point_comps(catsource_t *temp_cropped_src)¶
Sets all values associated with a SHAPELET component in
temp_cropped_srcto NULL.When splitting up a sky model into chunks, and we know there are no SHAPELET components, set everything in
temp_cropped_srcthat refers to a SHAPELET source component to a NULL or zero to ensure no SHAPELET sources are simulated- Parameters
*temp_cropped_src – [in] Pointer to a
catsource_tstruct
-
void null_gauss_comps(catsource_t *temp_cropped_src)¶
Sets all values associated with a SHAPELET component in
temp_cropped_srcto NULL.When splitting up a sky model into chunks, and we know there are no SHAPELET components, set everything in
temp_cropped_srcthat refers to a SHAPELET source component to a NULL or zero to ensure no SHAPELET sources are simulated- Parameters
*temp_cropped_src – [in] Pointer to a
catsource_tstruct
-
void null_shapelet_comps(catsource_t *temp_cropped_src)¶
Sets all values associated with a SHAPELET component in
temp_cropped_srcto NULL.When splitting up a sky model into chunks, and we know there are no SHAPELET components, set everything in
temp_cropped_srcthat refers to a SHAPELET source component to a NULL or zero to ensure no SHAPELET sources are simulated- Parameters
*temp_cropped_src – [in] pointer to a
catsource_tstruct
-
void increment_point(catsource_t *temp_cropped_src, catsource_t *cropped_src, int *point_iter, int num_time_steps)¶
When chunking the sky model in
cropped_src, usepoint_iterto stick the correct parts of POINT componentscropped_srcintotemp_cropped_srcGiven the larger sky model
cropped_srcand the indexpoint_iter, use pointer arithmatic to update the POINT component related attributes intemp_cropped_srcto point to the correct chunk ofcropped_src. Also neednum_time_stepsto correctly index the az/za coords as az/za change per time- Parameters
*temp_cropped_src – [inout] Pointer to a
catsource_tstruct to contain the ‘chunked’ sky model*cropped_src – [in] Pointer to a
catsource_tstruct that contains the full sky model*point_iter – [in] Pointer to integer to correctly index the information in
cropped_srcand point to intemp_cropped_srcnum_time_steps – [in] Number of time steps in the simulation
-
void increment_gauss(catsource_t *temp_cropped_src, catsource_t *cropped_src, int *gauss_iter, int num_time_steps)¶
When chunking the sky model in
cropped_src, usegauss_iterto stick the correct parts of GAUSS componentscropped_srcintotemp_cropped_srcGiven the larger sky model
cropped_srcand the indexgauss_iter, use pointer arithmatic to update the GAUSS component related attributes intemp_cropped_srcto point to the correct chunk ofcropped_src. Also neednum_time_stepsto correctly index the az/za coords as az/za change per time- Parameters
*temp_cropped_src – [inout] Pointer to a
catsource_tstruct to contain the ‘chunked’ sky model*cropped_src – [in] Pointer to a
catsource_tstruct that contains the full sky model*gauss_iter – [in] Pointer to integer to correctly index the information in
cropped_srcand point to intemp_cropped_srcnum_time_steps – [in] Number of time steps in the simulation
-
void increment_shapelet(catsource_t *temp_cropped_src, catsource_t *cropped_src, int *shape_iter, int num_time_steps)¶
When chunking the sky model in
cropped_src, useshape_iterto stick the correct parts of SHAPELET componentscropped_srcintotemp_cropped_srcGiven the larger sky model
cropped_srcand the indexshape_iter, use pointer arithmatic to update the SHAPELET component related attributes intemp_cropped_srcto point to the correct chunk ofcropped_src. Also neednum_time_stepsto correctly index the az/za coords as az/za change per time- Parameters
*temp_cropped_src – [inout] Pointer to a
catsource_tstruct to contain the ‘chunked’ sky model*cropped_src – [in] Pointer to a
catsource_tstruct that contains the full sky model*shape_iter – [in] Pointer to integer to correctly index the information in
cropped_srcand point to intemp_cropped_srcnum_time_steps – [in] Number of time steps in the simulation
-
void fill_chunk_src_with_pointgauss(catsource_t *temp_cropped_src, catsource_t *cropped_src, int chunk_ind, int comps_per_chunk, woden_settings_t *woden_settings)¶
When splitting the sky model
cropped_srcintonum_chunkssmaller sky models each of sizechunking_size, fill the chunked sky modeltemp_cropped_srcat indexchunk_indwith the correct number of POINT and GAUSSIAN component settings.Here we are splitting the sky model
cropped_srcintonum_chunkssmaller sky models, each containing a number (comps_per_chunk) of components. This function returns a single ‘chunked’ sky model intemp_cropped_src, which when iterating through the total number of POINT and GAUSSIAN components in chunks of sizecomps_per_chunk, corresponds to the chunked model at indexchunk_ind.- Parameters
*temp_cropped_src – [inout] Pointer to a
catsource_tstruct to contain the ‘chunked’ sky model*cropped_src – [in] Pointer to a
catsource_tstruct that contains the full sky modelchunk_ind – [in] The index of the chunked sky model to be returned
comps_per_chunk – [in] Number of components to put in each chunk
*woden_settings – [in] A populated
woden_settings_tcontaining the simulation setting
-
void fill_chunk_src_with_shapelets(catsource_t *temp_cropped_src, catsource_t *cropped_src, int chunk_ind, int coeffs_per_chunk, woden_settings_t *woden_settings)¶
When splitting the sky model
cropped_srcintonum_chunkssmaller sky models each of sizechunking_size, fill the chunked sky modeltemp_cropped_srcat indexchunk_indwith the correct number of SHAPELET component settings.When splitting the sky model up, we split SHAPELET components separately to POINT and GAUSSIANs as the besis functions take up more GPU memory - this can butt heads with primary beam calculations that also take up memory for POINT and GAUSSIANs. This function returns a single ‘chunked’ sky model in
temp_cropped_src, which when iterating through the total number of SHAPELET basis functions in chunks of sizecomps_per_chunk, corresponds to the chunked model at indexchunk_ind.- Parameters
*temp_cropped_src – [inout] Pointer to a
catsource_tstruct to contain the ‘chunked’ sky model*cropped_src – [in] Pointer to a
catsource_tstruct that contains the full sky modelchunk_ind – [in] The index of the chunked sky model to be returned
coeffs_per_chunk – [in] Number of basis function params to put in each chunk
*woden_settings – [in] A populated
woden_settings_tcontaining the simulation setting
-
source_catalogue_t *create_chunked_sky_models(catsource_t *cropped_src, woden_settings_t *woden_settings)¶
Takes the sky model in
cropped_srcand splits it into bitesize pieces to fit on the GPU. Returns the models inside asource_catalogue_tstruct, with the models stored insource_catalogue_t->catsources.This is basically a wrapper around
fill_chunk_src_with_pointgaussandfill_chunk_src_with_shapelets- Parameters
*cropped_src – [in] Pointer to a
catsource_tstruct that contains the full*woden_settings – [in] A populated
woden_settings_tcontaining the simulation settings, including the chunking size
- Returns
source_catalogue_tA struct containing the chunked sky models that can be fed intocalculate_visibilities::calculate_visibilities.