Total Complexity | 1 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from hawc_hal.region_of_interest.healpix_cone_roi import HealpixConeROI, HealpixROIBase |
||
|
|||
2 | from hawc_hal.region_of_interest.healpix_map_roi import HealpixMapROI |
||
3 | |||
4 | |||
5 | def get_roi_from_dict(dictionary): |
||
6 | """ |
||
7 | Make a ROI from a dictionary such as the one read from the hd5 file of the maptree. |
||
8 | |||
9 | :param dictionary: |
||
10 | :return: |
||
11 | """ |
||
12 | |||
13 | roi_type = dictionary['ROI type'] |
||
14 | |||
15 | return globals()[roi_type].from_dict(dictionary) |
||
16 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.