JSOCClient fetch sometimes returns hmi.sharp_720s_nrt bitmap files in the wrong file name format

Open
#7,296 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api, backend

Research direction

Start with drms client.py and the _generate_filenamefmt function, then trace how JSOCClient request_data calls the export API without filenamefmt. Reproduce a bitmap download for hmi.sharp_720s_nrt and compare the generated name with the expected HARPNUM/T_REC format. Done means bitmap files consistently use the expected format, with coverage for the observed fallback case.

Written by the indexing model from the issue text.

Description

Effort High net Package Expert Priority Low
Describe the bug

hmi.sharp_720s_nrt files when downloaded via JSOCClient fetch should have the following file name format: hmi.sharp_720s_nrt.{HARPNUM}.{T_REC:A}.{segment}. However I have observed a couple of times when the files were in the wrong file name format: hmi.sharp_720s_nrt.{recnum:%d}.{segment}. I have only observed this with the bitmap files.

Looking at the drms source code briefly shows that if filenamefmt is not passed in to the export function (which JSOCClient request_data does not), then the prime keys for the series should be used to form the filename format. The prime keys for the series are HARPNUM and T_REC. However, we are seeing a few instances where the format is wrong. It seems perhaps none of these prime keys are available to be used to form the file name format in drms client.py function _generate_filenamefmt.

Has this behavior been observed before? Is this a JSOC API issue as the prime keys are retrieved from JSOC?

To Reproduce

No response

Screenshots

No response

System Details

sunpy version 4.0.5

Installation method

No response

Dominant language
Python
Stars
1k
Forks
682
Avg merge
1d 17h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sunpy/sunpy

All issues in sunpy/sunpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.