Inspector is a tool for inspecting PBjam results and updating the prior file.
It consists of a PyQt-based graphical interface for browsing, inspecting, and accepting/rejecting pickled modeID results from PBjam.
The UI is designed to work with large catalogs (10,000+ stars) and allows step-by-step validation of sampled parameters for each individual target.
Clone the repository and install locally:
git clone https://github.com/pbjam-projects/inspector.git
It is advisable to first set up a virtual environment to avoid clashing with existing package versions. There are several options but Python's default venv package is usually fine:
python -m venv path/to/myvenv
source path/to/myvenv/bin/activate
Next install inspector:
cd path/to/inspector
pip install -e .
After installation, run the UI with:
inspector
You should be able to call this anywhere, and should open the PyQt application.
- Launch the application by typing
inspectorin a terminal. - When working with
inspectoryou set up a project for vetting results and updating the prior file, this makes it easier to control saving and resuming the your progress. - Click
New project, and select the prior file and target list to work from as prompted.
- The target list should be a CSV and must contain target
IDcolumn and a fullPathcolumn to the pickled result file. - The prior file should as a minimum contain the columns corresponding to the current PBjam prior. You can create a list with no targets if you wish, but working from prior file in the PBjam repo will let you compare to old results.
inspectorwill load the result dictionary for the first target in the target list and any .png files that start with the targetID, for example, KIC1234*.png- The mean values of both the new and any potential old results will be shown in the table area.
- Any plots for the target will be shown in the figure window and you can flip between them using the buttons.
- You can then either accept the l=2,0 model and/or the l=1 model results, or reject them both.
- If you accept both, or reject the results, the UI will automatically proceed to the next target, otherwise you'll have to manually go to the next target.
- When you've done this for long enough and want a break you can save the state of the current project, and potentially resume it later using the appropriate buttons in the UI. The UI will resume from the last unchecked target.
- At the very end you can export the results to a CSV file. Note The accepted results for a target already in the prior file will overwrite the old results. Any new targets will be appended to the end of the CSV.
A project requires:
Target list CSV
- A table with ID and Path columns
- A template prior file with columns corresponding to the PBjam prior parameters. This can be the prior file in the PBjam repo. Don't worry you won't be able to overwrite it.
- Optional image files that will help you decide if the results are good or bad. The file names must be of the form
targetID*.png.