Commits
157 157 | return -1, f"threshold must be >= 0" |
158 158 | except ValueError: |
159 159 | if isinstance(msg['threshold'], str) and "jy" in msg['threshold'].lower(): |
160 160 | self._threshold_to_float(msg['threshold']) # Convert str to float |
161 161 | else: |
162 162 | return -1, f"threshold must be a number, or a number with units (Jy/mJy/uJy)" |
163 163 | |
164 164 | if 'cyclefactor' in msg: |
165 165 | try: |
166 166 | self._cyclefactor = float(msg['cyclefactor']) |
167 - | if self._cyclefactor < 1: |
168 - | return -1, f"cyclefactor must be >= 1" |
167 + | if self._cyclefactor <= 0: |
168 + | return -1, f"cyclefactor must be > 0" |
169 169 | except ValueError: |
170 170 | return -1, "cyclefactor must be a number" |
171 171 | |
172 172 | return 0, "" |
173 173 | |
174 174 | |
175 175 | |
176 176 | def _threshold_to_float(self, msg=None): |
177 177 | # Convert threshold from string to float if necessary |
178 178 | if msg is not None: |