Skip to content

Commit b5e5f37

Browse files
style: pre-commit fixes
1 parent e3bc054 commit b5e5f37

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ Corresponds with DR1 paper.
384384

385385
- `submit/casda_pre_prep.sh`
386386
- `submit/casda_prep_test.sh`
387-
- ASKAP RACS database as a submodule (changes how `init_databse.py` ingests
387+
- ASKAP RACS database as a submodule (changes how `init_database.py` ingests
388388
data)
389389

390390
## [0.2.0] - 2019-12-01

arrakis/makecat.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class SpectralIndices(NamedTuple):
5858
betas_err: np.ndarray
5959

6060

61-
def combinate( # codespell:ignore[combinate]
61+
def combine( # codespell:ignore[combine]
6262
data: ArrayLike,
6363
) -> tuple[ArrayLike, ArrayLike]:
6464
"""Return all combinations of data with itself
@@ -69,8 +69,8 @@ def combinate( # codespell:ignore[combinate]
6969
Returns:
7070
Tuple[ArrayLike, ArrayLike]: Data_1 matched with Data_2
7171
"""
72-
ix, iy = np.triu_indices(data.shape[0], k=1)
73-
idx = np.vstack((ix, iy)).T
72+
ix, it = np.triu_indices(data.shape[0], k=1)
73+
idx = np.vstack((ix, it)).T
7474
dx, dy = data[idx].swapaxes(0, 1)
7575
return dx, dy
7676

@@ -684,7 +684,7 @@ def get_integration_time(cat: RMTable, field_col: Collection, sbid: int | None =
684684
] * len(field_names)
685685
unique_field_names = list(set(field_names))
686686

687-
reutrn_vals = {"_id": 0, "SCAN_TINT": 1, "FIELD_NAME": 1, "SBID": 1}
687+
return_vals = {"_id": 0, "SCAN_TINT": 1, "FIELD_NAME": 1, "SBID": 1}
688688

689689
doc_count = field_col.count_documents(query)
690690

@@ -699,7 +699,7 @@ def get_integration_time(cat: RMTable, field_col: Collection, sbid: int | None =
699699
else:
700700
logger.warning("Using SELECT=0 instead.")
701701

702-
field_data = list(field_col.find(query, reutrn_vals))
702+
field_data = list(field_col.find(query, return_vals))
703703
tint_df = pd.DataFrame(field_data)
704704
tint_df.set_index("FIELD_NAME", inplace=True, drop=False)
705705

@@ -1033,7 +1033,7 @@ def main(
10331033

10341034
rmtab = RMTable()
10351035
# Add items to main cat using RMtable standard
1036-
for j, [name, typ, src, col, unit] in enumerate(
1036+
for j, [name, typo, src, col, unit] in enumerate(
10371037
tqdm(
10381038
zip(
10391039
columns_possum.output_cols,
@@ -1067,7 +1067,7 @@ def main(
10671067
except KeyError as e:
10681068
logger.error(f"Island {src_id} does not have {col}")
10691069
raise e
1070-
new_col = Column(data=data, name=name, dtype=typ, unit=unit)
1070+
new_col = Column(data=data, name=name, dtype=typo, unit=unit)
10711071
rmtab.add_column(new_col)
10721072

10731073
if src == "synth":
@@ -1076,13 +1076,13 @@ def main(
10761076
data += [comp["rmclean_summary"][col]]
10771077
except KeyError:
10781078
data += [comp["rmsynth_summary"][col]]
1079-
new_col = Column(data=data, name=name, dtype=typ, unit=unit)
1079+
new_col = Column(data=data, name=name, dtype=typo, unit=unit)
10801080
rmtab.add_column(new_col)
10811081

10821082
if src == "header":
10831083
for src_id, comp in comps_df.iterrows():
10841084
data += [comp["header"][col]]
1085-
new_col = Column(data=data, name=name, dtype=typ, unit=unit)
1085+
new_col = Column(data=data, name=name, dtype=typo, unit=unit)
10861086
rmtab.add_column(new_col)
10871087

10881088
for selcol in tqdm(

arrakis/merge_fields.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def main(
317317
merge_name=merge_name,
318318
)
319319

320-
mutilple_updates = merge_multiple_fields(
320+
multiple_updates = merge_multiple_fields(
321321
field_dict=field_dict,
322322
data_dir=data_dir,
323323
beams_col=beams_col,
@@ -326,7 +326,7 @@ def main(
326326
)
327327

328328
singleton_comp = [f.result() for f in singleton_updates]
329-
multiple_comp = [f.result() for f in mutilple_updates]
329+
multiple_comp = [f.result() for f in multiple_updates]
330330

331331
for m in multiple_comp:
332332
m._doc["$set"].update({f"beams.{merge_name}.DR1": True})

arrakis/rmsynth_oncuts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def rmsynthoncut3d(
190190
fitRMSF=fitRMSF,
191191
prefixOut=prefix,
192192
outDir=os.path.dirname(ifile),
193-
write_seperate_FDF=True,
193+
write_separate_FDF=True,
194194
not_rmsf=not_RMSF,
195195
nBits=32,
196196
verbose=rm_verbose,

scripts/casda_prepare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def main(
514514
casda_dir = os.path.join(data_dir, f"casda_{prep_type}")
515515
try_mkdir(casda_dir)
516516

517-
# Link catalgoue to casda directory
517+
# Link catalogue to casda directory
518518
cat_dir = os.path.join(casda_dir, "catalogues")
519519
try_mkdir(cat_dir)
520520
if prep_type != "full":

0 commit comments

Comments
 (0)