Skip to content

Commit

Permalink
Only read in the columns we need for region_core_info
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-l-kong committed Nov 21, 2023
1 parent 6cc4909 commit 9d8a6a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/maldi_tools/extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,11 @@ def map_coordinates_to_core_name(
poslog_path,
delimiter=" ",
names=["Date", "Time", "Region", "PosX", "PosY", "X", "Y", "Z"],
usecols=["Region", "X", "Y"],
index_col=False,
skiprows=1,
)
region_core_info = region_core_info[region_core_info["Region"] != "__"].copy()

region_core_info = region_core_info[["Date", "Time", "Region", "X", "Y"]]
region_core_info["Region"] = region_core_info["Region"].str.extract(r"^(.*?)(?=X)")
region_core_info[["X", "Y"]] = coords

Expand Down

0 comments on commit 9d8a6a6

Please sign in to comment.