Skip to content

PBjam-projects/inspector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inspector

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.


Installation

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.


Example Workflow

  1. Launch the application by typing inspector in a terminal.
  2. When working with inspector you set up a project for vetting results and updating the prior file, this makes it easier to control saving and resuming the your progress.
  3. 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 ID column and a full Path column 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.
  1. inspector will load the result dictionary for the first target in the target list and any .png files that start with the target ID, for example, KIC1234*.png
  2. The mean values of both the new and any potential old results will be shown in the table area.
  3. Any plots for the target will be shown in the figure window and you can flip between them using the buttons.
  4. You can then either accept the l=2,0 model and/or the l=1 model results, or reject them both.
  5. 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.
  6. 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.
  7. 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.

Input Files

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.

About

Tool for inspecting PBjam results and and updating the prior file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages