Add an example and documents about how to use the `aia_scale` option to export AIA lev1.5 data from JSOC through `drms`
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 57/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu với entry point drms.client.export() và ví dụ export cutout hiện có được liên kết trong issue. Ghi lại quy trình aia_scale_aialev1, bao gồm các ví dụ tối thiểu và cutout, đồng thời xác minh rằng ví dụ giải thích các tham số được chấp nhận và tạo ra bản export AIA level 1.5 như dự kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the feature
JSOC provides several useful processing procedures when exporting AIA and HMI data, such as the cutout service and aia_scale. The latter scales the plate size to 0.6 arcsec per pixel across the AIA channels. According to this tutorial, the aia_scale option "essentially converts the data level 1 to level 1.5 and removes the latter use of aia_prep". Therefore, JSOC users can save a lot of time processing their level 1 AIA data to level 1.5 using aia_prep.pro in SolarSoft or its corresponding implementation in aiapy.
However, how to use the aia_scale option in drms is unclear to the users and poorly documented in both drms and JSOC reference. Since the cutout service has been well illustrated in the example and integrated into the JSOC client in sunpy.net.Fido, it would be desirable to provide an example or even, in the future, add an a.Level(1.5) support through the JSOC client.
Many thanks to @wtbarnes for pointing me to this pull request https://github.com/sunpy/drms/pull/43#discussion_r513024285, where @davisite explains the keys passed to enable aia_scale. In summary, there are three accepted keys of the dictionary passed to the process argument in drms.client.export(), which are related to the rescale: aia_scale_orig, aia_scale_aialev1, and aia_scale_other. After testing these keys with the method mentioned in this issue https://github.com/sunpy/drms/issues/25, I found something different with what @davisite mentioned in the original pull request. aia_scale_aialev1 works for the AIA level 1 data (both aia.lev1_euv_12s and aia.lev1_uv_24s) that I tested, and aia_scale_other works for the HMI Blos data (e.g., hmi.M_45s). Please also see the screenshots of the JSOC export below:
Therefore, a minimal example of exporting AIA level 1.5 data using drms is
import os
from pathlib import Path
import drms
client = drms.Client()
email = os.environ["JSOC_EMAIL"]
# Create download directory if it does not exist yet.
out_dir = Path("downloads")
if not out_dir.exists():
Path(out_dir).mkdir(parents=True)
qstr = "aia.lev1_euv_12s[2022-10-25T19:00][171]"
result = client.export(qstr, method="url", email=email, protocol="fits",
process={"aia_scale_aialev1":{None:None}})
result.wait()
result.download(out_dir)
Note that we used None in the value to fool drms because drms.client.export() assumes the value of aia_scale_aialev1 is another dictionary, or one may use {"aia_scale_aialev1":{'high':4096}} (cut 4096 of the 4096 pixels); maybe we can change that in the future.
A more complicated example of using aia_scale with both updating the master pointing and cutout the data in a box will be
process = {"aia_scale_aialev1":
{"xc": 200.0, #The X coordinate (pixels) of the cutout center; at Sun Center, X == 0
"yc": 100.0, #The Y coordinate (pixels) of the cutout center; at Sun Center, Y == 0
"wide": 300, #The width of the cutout, in integer pixels
"high": 600, #The height of the cutout, in integer pixels
"mpt": "aia.master_pointing3h" # Use a master pointing table to scale images (instead of keyword values)
# or "sdo.master_pointing", "aia_test-master_pointing3h",
# "lm_jps.master_pointing3h"
}
}
result = client.export(qstr, method="url", email=email,protocol="fits",
process=process)
I hope this can save people like me who want to download nearly science-ready AIA files. This question was initially raised by Henrik Jentgens. I give him credit here.
Proposed solution
No response
- Ngôn ngữ chính
- Python
- Star
- 26
- Fork
- 25
- Merge trung bình
- 4 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sunpy/drms
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Unskip Doc tests in #137Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
-
Dynamic URLsĐang mởFeature Request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
client.export status should update on completionCó thể đã có người làm @shaswat2406 đã nhận 6 ngày trước. Đang mởBug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Example Gallery ImprovementsĐang mởFeature Request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sususweet/midea_auto_cloud#285 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Short positive Table maxlen values produce oversized cellsCó thể đã có người làm @Gambit-Checkmate đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 18 ngày
-
Suggestion: Add requirements.txtĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
MangasMango/bound-to-rot#41 · 1 bình luận ·
-
breaking change
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Word viper missingĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
dwyl/english-words#244 ·