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

Setting file names to start with object_id #26

Merged
merged 1 commit into from
Aug 15, 2024
Merged
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
6 changes: 3 additions & 3 deletions src/fibad/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
# These are the fields that are allowed to vary across the locations
# input from the catalog fits file. Other values for HSC cutout server
# must be provided by config.
#
# Order here is intentional, this is also a sort order to optimize
# queries to the cutout server.
variable_fields = ["tract", "ra", "dec"]


Expand Down Expand Up @@ -162,6 +159,9 @@
args = {field: location[field] for field in variable_fields}
args["lineno"] = index + offset
args["tract"] = str(args["tract"])
# Sets the file name on the rect to be the object_id, also includes other rect fields
# which are interpolated at save time, and are native fields of dc.Rect.
args["name"] = f"{location['object_id']}_{{type}}_{{ra:.5f}}_{{dec:+.5f}}_{{tract}}_{{filter}}"

Check warning on line 164 in src/fibad/download.py

View check run for this annotation

Codecov / codecov/patch

src/fibad/download.py#L164

Added line #L164 was not covered by tests
rect = dC.Rect.create(default=default, **args)
rects.append(rect)

Expand Down