Skip to content

Commit

Permalink
Bump requirement versions (#893)
Browse files Browse the repository at this point in the history
* Bump requirement versions

* Bump requirements

* Remove unused AGN module for elasticc

* Rename SLSN function, and put correct args
  • Loading branch information
JulienPeloton authored Oct 9, 2024
1 parent d23c0bb commit a223338
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
9 changes: 4 additions & 5 deletions deps/requirements-science.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Fink-science dependencies
# WARNING: fink-science pip module is deprecated and fink-science is now installed from source

git+https://github.com/astrolabsoftware/fink-science@5.15.0
git+https://github.com/astrolabsoftware/fink-science@5.20.0

# xmatch_cds
line_profiler==4.1.3

# Active learning
-e git+https://github.com/emilleishida/fink_sn_activelearning.git@4f46b3a1e29de45793125452974e71e92c1ea454#egg=actsnfink
-e git+https://github.com/emilleishida/fink_sn_activelearning.git@cb61bbb34630c7811862050389b0f993de9639c7#egg=actsnfink
-e git+https://github.com/COINtoolbox/ActSNClass.git@2c61da91a9d13834d39804fc35aeb3245ba20755#egg=actsnclass
joblib==1.2.0

Expand All @@ -22,7 +22,7 @@ colorama
seaborn

# SNAD
light-curve[full]==0.8.2
light-curve[full]==0.9.6

# AGN
iminuit==2.21.0
Expand All @@ -31,8 +31,7 @@ iminuit==2.21.0
-e git+https://github.com/b-biswas/kndetect@kndetect#egg=kndetect

# CATS dependencies
tensorflow==2.9.2
tensorflow_addons==0.18.0
tensorflow==2.15

# Anomalies
onnxruntime
Expand Down
6 changes: 3 additions & 3 deletions deps/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ avro-python3
fastavro==1.6.0

# Fink core
fink_filters>=3.33
fink-utils>=0.19.0
fink-spins>=0.3.7
fink_filters>=3.37
fink-utils>=0.28.0
fink-spins>=0.3.8
fink-tns>=0.9

# Misc
Expand Down
11 changes: 4 additions & 7 deletions fink_broker/science.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
from fink_science.random_forest_snia.processor import rfscore_rainbow_elasticc
from fink_science.snn.processor import snn_ia_elasticc, snn_broad_elasticc
from fink_science.cats.processor import predict_nn
from fink_science.agn.processor import agn_elasticc
from fink_science.slsn.processor import slsn_elasticc
from fink_science.slsn.processor import slsn_elasticc_with_md
from fink_science.fast_transient_rate.processor import magnitude_rate
from fink_science.fast_transient_rate import rate_module_output_schema
# from fink_science.t2.processor import t2
Expand Down Expand Up @@ -599,7 +598,7 @@ def apply_science_modules_elasticc(df: DataFrame) -> DataFrame:
df = df.withColumn("cats_broad_class", mapping_cats_general_expr[df["cats_argmax"]])
df = df.withColumnRenamed("cbpf_preds", "cats_broad_array_prob")

# AGN & SLSN
# SLSN
args_forced = [
"diaObject.diaObjectId",
"cmidPointTai",
Expand All @@ -610,11 +609,9 @@ def apply_science_modules_elasticc(df: DataFrame) -> DataFrame:
"diaSource.decl",
"diaObject.hostgal_zphot",
"diaObject.hostgal_zphot_err",
"diaObject.hostgal_ra",
"diaObject.hostgal_dec",
"diaObject.hostgal_snsep",
]
df = df.withColumn("rf_agn_vs_nonagn", agn_elasticc(*args_forced))
df = df.withColumn("rf_slsn_vs_nonslsn", slsn_elasticc(*args_forced))
df = df.withColumn("rf_slsn_vs_nonslsn", slsn_elasticc_with_md(*args_forced))

# Drop temp columns
df = df.drop(*expanded)
Expand Down

0 comments on commit a223338

Please sign in to comment.