Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
FusRoman committed Oct 5, 2023
1 parent 0138ed4 commit 0f9bb2d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion fink_mm/observatory/LVK/LVK.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from datetime import datetime


def gcn_from_hdfs(client: InsecureClient, root_path: str, triggerId: str, triggerTime: datetime, gcn_status: str)->pd.DataFrame:
def gcn_from_hdfs(client: InsecureClient, root_path: str, triggerId: str, triggerTime: datetime, gcn_status: str) -> pd.DataFrame:
path_date = os.path.join(
root_path,
f"year={triggerTime.year:04d}/month={triggerTime.month:02d}/day={triggerTime.day:02d}",
Expand Down
4 changes: 3 additions & 1 deletion fink_mm/utils/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class Application(Flag):
JOIN = auto()
DISTRIBUTION = auto()

def build_application(self, logger: LoggerNewLine, data_mode: DataMode = None, **kwargs) -> str:
def build_application(
self, logger: LoggerNewLine, data_mode: DataMode = None, **kwargs
) -> str:
"""
Return the command line application
Expand Down
12 changes: 4 additions & 8 deletions fink_mm/utils/fun_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def get_association_proba(
jdstarthist: pd.Series,
hdfs_adress: pd.Series,
gcn_status: pd.Series,
root_path: pd.Series
root_path: pd.Series,
) -> pd.Series:
"""
Compute the association probability between the ztf alerts and the gcn events.
Expand Down Expand Up @@ -431,7 +431,7 @@ def get_association_proba(
z_trigger_time,
hdfs_adress=hdfs_adress.values[0],
gcn_status=status,
root_path=root
root_path=root,
)
for obs, event, z_ra, z_dec, z_trigger_time, status, root in zip(
obsname, rawEvent, ztf_ra, ztf_dec, jdstarthist, gcn_status, root_path
Expand Down Expand Up @@ -726,11 +726,7 @@ def format_rate_results(spark_df, rate_column):
)


def join_post_process(
df_grb: DataFrame,
hdfs_adress: str,
root_path: str
) -> DataFrame:
def join_post_process(df_grb: DataFrame, hdfs_adress: str, root_path: str) -> DataFrame:
"""
Post processing after the join, used by offline and online
Expand Down Expand Up @@ -807,7 +803,7 @@ def join_post_process(
df_grb["start_vartime"],
F.lit(hdfs_adress),
df_grb["gcn_status"],
F.lit(root_path)
F.lit(root_path),
),
)

Expand Down
2 changes: 1 addition & 1 deletion fink_mm/ztf_join_gcn.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def print_logs():
df_join["rb"],
df_join["gcn_loc_error"],
df_join["p_assoc"],
df_join["rate"]
df_join["rate"],
),
)

Expand Down

0 comments on commit 0f9bb2d

Please sign in to comment.