Checks if ID (``n_id``) of the element emission line is valid, i.e. the name of the line may be obtained by using the ID. Parameters ---------- n_id : Int index of the element emission line in the list (often equal to 'self.element_i
(self, n_id)
| 837 | return False |
| 838 | |
| 839 | def is_element_line_id_valid(self, n_id): |
| 840 | """ |
| 841 | Checks if ID (``n_id``) of the element emission line is valid, |
| 842 | i.e. the name of the line may be obtained by using the ID. |
| 843 | |
| 844 | Parameters |
| 845 | ---------- |
| 846 | |
| 847 | n_id : Int |
| 848 | index of the element emission line in the list |
| 849 | (often equal to 'self.element_id') |
| 850 | |
| 851 | Returns True if the element line is valid |
| 852 | """ |
| 853 | |
| 854 | # There may be a more efficient way to check 'n_id', |
| 855 | # but we want to use the same function as we use |
| 856 | # to retrive the line name |
| 857 | ename = self.get_element_line_name_by_id(n_id) |
| 858 | |
| 859 | if ename is None: |
| 860 | return False |
| 861 | else: |
| 862 | return True |
| 863 | |
| 864 | def get_element_line_name_by_id(self, n_id): |
| 865 | """ |
no test coverage detected