lincc-frameworks / lincc-frameworks/koffi

Simplify the PotentialSource build functions.

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Small refactor.
Right now, to create a PotentialSource object, we have to do
```python
ps = koffi.PotentialSource()
ps.build_from_images_and_xy_positions(pixel_positions, mjds)
```
it would be much nicer if we could do it like this
```python
# call build directy
ps1 = koffi.PotentialSource()
ps1.build(pixel_positions, mjds, format = "xy")

# build from constructor
ps2 = koffi.PotentialSource(pixel_positions, mjds, format="xy")
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting PotentialSource, its constructor, and build_from_images_and_xy_positions to understand the current construction paths. Add the requested build and constructor call forms while preserving the existing behavior, then verify that both examples create equivalent PotentialSource objects.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.