Skip to content

Commit

Permalink
Issue/92/orbfit improvement (#95)
Browse files Browse the repository at this point in the history
* new script to manage the files read and write by orbfit

* import the file management function in orbfit_local and orbfit_merger

* fix some bugs and finish integration of the new orbfit file management

* pep8 requirements

* finish to rewrite the orbfit system

* update doc

* pep8 requirements

* fix ephem bug

* fix test buggy paste

* fix test in orbfit_files.py

* new test for orbfit_files.py

* add new options to orbfit local

* pep8 requirements

* remove read_oel from orbfit_merger

* add K21E00A_test.oel

* pep8 requirements

* fix bug in the mpc obs file writer

* add a lot of test for the mpc obs writer

* add verbose level of orbfit

* fix verbose orbfit

* fix verbose orbfit

* some improvements

* fix ram_dir bug

* add more test, the trajectory merger with OrbFit works again

* update licence

* remove the old ephem.py, add the orbfit_ephem.py

* add test for the orbfit merger

* update test

* pep8 requirements

* update pickle version for test

* install pickle5

* update oop file generator, step_ephem is now an option and will not be write in the file if not set

* add an option to skip the initial orbit fitting if a .oel file exist

* fix test bug

* fix test bug

* restore test

* add an options to the write_oop, we can now specify the path of a .oel file

* update test

* update cli merge orbit

* bump to 0.8.0
  • Loading branch information
FusRoman authored Jun 23, 2022
1 parent e0e6389 commit e5c075f
Show file tree
Hide file tree
Showing 75 changed files with 13,386 additions and 1,765 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ exclude =
dist
fink_fat/others/plot_perf_test.py
fink_fat/others/night_report.py
../fink-fat/fink_fat_out_2/mpc/test_assoc_tag.py
count
show-source
statistics
per-file-ignores =
../fink-fat/fink_fat/orbit_fitting/orbfit_files.py:W503
../fink-fat/fink_fat/orbit_fitting/mpcobs_files.py:W503
../fink-fat/fink_fat/orbit_fitting/orbfit_local.py:W503
../fink-fat/fink_fat/orbit_fitting/orbfit_cluster.py:W503
../fink-fat/fink_fat/orbit_fitting/orbfit_merger.py:W503
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- name: install OrbFit SoftWare
run: |
./fink_fat/test/orbFit_installer.sh
- name: update pickle
run: |
pip install pickle5
- name: Run test suites
run: |
./run_test.sh
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [2022] [Le Montagner Roman]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
9 changes: 5 additions & 4 deletions bin/fink_fat_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import datetime
import glob
from astropy import units as u
from astropy.time import Time
from terminaltables import DoubleTable, AsciiTable, SingleTable
from bin.offline_cli import offline_intro_reset, offline_yes_reset
from bin.orbit_cli import (
Expand All @@ -72,7 +73,7 @@
from fink_fat.associations.inter_night_associations import night_to_night_association
from fink_fat.others.utils import cast_obs_data
from fink_fat.orbit_fitting.orbfit_local import compute_df_orbit_param
from fink_fat.orbit_fitting.orbfit_merger import orbit_identification
from fink_fat.orbit_fitting.orbfit_merger import merge_orbit
from bin.association_cli import (
get_data,
get_last_sso_alert,
Expand Down Expand Up @@ -346,16 +347,16 @@ def main():

t_before = t.time()
# call the orbit identification that will merge trajectories
merge_traj_orb, merger_orb_df = orbit_identification(
merge_traj = merge_orbit(
traj_orb_df,
orb_df,
config["SOLVE_ORBIT_PARAMS"]["ram_dir"],
int(config["MERGE_ORBIT_PARAMS"]["neighbor"]),
int(config["SOLVE_ORBIT_PARAMS"]["cpu_count"]),
prop_epoch=(Time.now() + 2 * u.hour).jd
)

merge_traj_orb.to_parquet(traj_orb_path)
merger_orb_df.to_parquet(orb_res_path)
merge_traj.to_parquet(os.path.join(output_path, "merge_traj.parquet"))

if arguments["--verbose"]:
print("Merging of the trajectories done !")
Expand Down
2 changes: 1 addition & 1 deletion fink_fat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = "0.7.1"
__version__ = "0.8.0"
Empty file modified fink_fat/orbit_fitting/AST17.bai_431_fcct
100644 → 100755
Empty file.
Empty file modified fink_fat/orbit_fitting/AST17.bep_431_fcct
100644 → 100755
Empty file.
240 changes: 0 additions & 240 deletions fink_fat/orbit_fitting/ephem.py

This file was deleted.

Loading

0 comments on commit e5c075f

Please sign in to comment.