From e667447e1480422f6827a4752de4749be08d4e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Faria?= Date: Thu, 25 Jul 2024 13:59:31 +0200 Subject: [PATCH] FWHM can use CCF errors consistently with RV --- iCCF/iCCF.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/iCCF/iCCF.py b/iCCF/iCCF.py index b9ac59a..6cb6eee 100644 --- a/iCCF/iCCF.py +++ b/iCCF/iCCF.py @@ -295,10 +295,10 @@ def FWHM(self): """ The full width at half maximum of the CCF """ eccf = self.eccf if self._use_errors else None try: - return FWHMcalc(self.rv, self.ccf, self.eccf, + return FWHMcalc(self.rv, self.ccf, eccf, guess_rv=self.pipeline_RV) except ValueError: - return FWHMcalc(self.rv, self.ccf, self.eccf) + return FWHMcalc(self.rv, self.ccf, eccf) @property def FWHMerror(self): @@ -324,7 +324,13 @@ def Wspan(self): @cached_property def contrast(self): """ The contrast (depth) of the CCF, measured in percentage """ - return contrast(self.rv, self.ccf) + return contrast(self.rv, self.ccf, self.eccf) + + @cached_property + def contrast_error(self): + """ Uncertainty on the contrast (depth) of the CCF, measured in percentage """ + return contrast(self.rv, self.ccf, self.eccf, error=True) + @property def all(self):