New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-43169: Create utility function to check for timebase errors #87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check whether you want the absolute value of the difference.
) | ||
return False | ||
|
||
return np.max(np.diff(cRIOtimestamps.values)) > maxDiff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be checking for np.max(np.abs(...
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know, kinda, but honestly, if time is running backwards then I think bets are so far off I'm happy to let it slide or explode in some other way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, then I suggest you make this raise if the diff is negative.
client : `lsst_efd_client.efd_helper.EfdClient` | ||
The EFD client to use. | ||
maxDiff : `float`, optional | ||
The maximum difference in cRIO timestamps to consider as a timebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Units are seconds? Also, is this the absolute value of the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, will add comment on being seconds, though it's hard-coded in the cRIO, so it's somewhat irrelevant and would need re-crafting for other topics depending on how they're packed.
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
from .mount import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just import hasTimebaseErrors
instead of *
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, thanks 👍
a8c2fb6
to
32c75aa
Compare
No description provided.