fix: key error for tess-point module#28
Open
rosahoogenboom wants to merge 1 commit into
Open
Conversation
replace 0-index with 1-index and check key exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, I'm very excited to start using MonoTools to help plan upcoming observations!
I tried to follow the MonoTools tutorial (Example 1 - Modelling a Duotransit), but encountered some issues.
When running
lc=lightcurve.multilc(tic,'tess', save=False,load=False,use_fast=False)andmod=fit.monoModel(tic,'tess',lc=lc), it fails withKeyerror: 96.This happens because the check for the id in sect_obs assumes that the id already exists. In tools.observed, the maximum sector is hardcoded to default to 96, but the indexing of out_dic starts at 0 (while TESS sector 0 does not exist). Therefore, key 96 was undefined. We fixed it by replacing the 0-index with 1-index and checking that the key exists.
Should the default maximum sector be updated?
The tutorial still includes
from MonoTools.MonoTools import fit,tools,starpars,lightcurve, but starpars can no longer be imported. Is there a replacement for the usage in tutorial 1 (mod.init_starpars())?Thanks!