Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discard the selavy unit row before reading #473

Merged
merged 2 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### Fixed

- Fixed Selavy catalogue ingest to discard the unit row before reading the data [#473](https://github.com/askap-vast/vast-pipeline/pull/473).
- Fixed initial job processing from the UI [#466](https://github.com/askap-vast/vast-pipeline/pull/466).
- Fixed links in `README.md` [#464](https://github.com/askap-vast/vast-pipeline/pull/464).
- Fixed basic association new sources created through relations [#443](https://github.com/askap-vast/vast-pipeline/pull/443)
Expand All @@ -45,6 +46,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### List of PRs

- [#473](https://github.com/askap-vast/vast-pipeline/pull/473) fix: discard the selavy unit row before reading.
- [#466](https://github.com/askap-vast/vast-pipeline/pull/466) fix: Fixed initial job processing from the UI.
- [#463](https://github.com/askap-vast/vast-pipeline/pull/463) feat: Added image add mode run restore command.
- [#433](https://github.com/askap-vast/vast-pipeline/pull/433) doc: add documentation GitHub pages website with CI.
Expand Down
8 changes: 3 additions & 5 deletions vast_pipeline/image/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,11 @@ def read_selavy(self, dj_image):
and remap them to correct names
"""
# TODO: improve with loading only the cols we need and set datatype
df = pd.read_fwf(self.selavy_path)
df = pd.read_fwf(self.selavy_path, skiprows=[1])
# drop first line with unit of measure, select only wanted
# columns and rename them
df = (
df.drop(0)
.loc[:, tr_selavy.keys()]
.rename(columns={x : tr_selavy[x]['name'] for x in tr_selavy})
df = df.loc[:, tr_selavy.keys()].rename(
columns={x: tr_selavy[x]["name"] for x in tr_selavy}
)

# fix dtype of columns
Expand Down