Skip to content

Commit

Permalink
Add pydoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykubica committed Oct 24, 2023
1 parent 614bad5 commit 4fb96be
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
45 changes: 42 additions & 3 deletions src/kbmod/search/pydocs/stamp_creator_docs.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace pydocs {
Returns
-------
`std::vector<RawImage>`
`list` of `RawImage`
The stamps.
)doc";

Expand Down Expand Up @@ -121,11 +121,50 @@ namespace pydocs {
)doc";

static const auto DOC_StampCreator_get_coadded_stamps = R"doc(
todo
Create a vector of co-added stamps centered on the predicted position
of trajectories at different times.
Parameters
----------
stack : `ImageStack`
The stack of images to use.
trj : `list` of `Trajectory`
The list of trajectories to uses.
use_index : `list` of `list` of `bool`
A list of lists (vectors) of Booleans indicating whether or not to use each
time step. use_index[i][j] indicates whether we should use timestep j of
trajectory i. An empty (size=0) list for any trajectory will use all time
steps for that trajectory.
params : `StampParameters`
The parameters for stamp generation, such as radius and co-add type.
use_gpu : `bool`
A Boolean indicating whether to do the co-adds on the CPU (False) or
GPU (True).
Returns
-------
`list` of `RawImage`
The co-added stamps.
)doc";

static const auto DOC_StampCreator_filter_stamp = R"doc(
todo
Filters stamps based on the given parameters.
Applies the following filters: peak position, percent flux at central pixel,
and image moments.
Parameters
----------
img : `RawImage`
The image to test.
params : `StampParameters`
The parameters for stamp generation and filtering.
Returns
-------
`bool`
Whether or not to filter the stamp.
)doc";

} /* pydocs */
Expand Down
2 changes: 1 addition & 1 deletion src/kbmod/search/stamp_creator.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class StampCreator {
static std::vector<RawImage> get_coadded_stamps(ImageStack& stack,
std::vector<Trajectory>& t_array,
std::vector<std::vector<bool> >& use_index_vect,
const StampParameters& params, bool use_cpu);
const StampParameters& params, bool use_gpu);

static std::vector<RawImage> get_coadded_stamps_gpu(ImageStack& stack,
std::vector<Trajectory>& t_array,
Expand Down

0 comments on commit 4fb96be

Please sign in to comment.