sunpy / sunpy-soar

A sunpy plugin for accessing data in the Solar Orbiter Archive (SOAR).
https://docs.sunpy.org/projects/soar/
BSD 2-Clause "Simplified" License
17 stars 11 forks source link

Observation mode added as a new metadata. #140

Open NucleonGodX opened 1 month ago

NucleonGodX commented 1 month ago

As from Eric's suggestion I've added support for observation mode for remote sensing instrument tables.

nabobalis commented 1 month ago

I think a how to section on using this might be nice?

NucleonGodX commented 1 month ago

I think a how to section on using this might be nice?

Are we interested in adding a data file for it, like we have for SOOP and Product?

nabobalis commented 1 month ago

I think a how to section on using this might be nice?

Are we interested in adding a data file for it, like we have for SOOP and Product?

If we can programmatically create it then yes

NucleonGodX commented 1 month ago

So I tried to fetch all values of observation modes for EUI, PHI, METIS, SOLOHI and SPICE, and the number is 329(i don't really know if it covers all but it should) out of this 244 are of SPICE.

nabobalis commented 1 month ago

So I tried to fetch all values of observation modes for EUI, PHI, METIS, SOLOHI and SPICE, and the number is 329(i don't really know if it covers all but it should) out of this 244 are of SPICE.

How did you fetch them? We should add a script that fetches them and saves them to a json file. We should make sure we do this with any fixed values we store.

NucleonGodX commented 1 month ago

So I tried to fetch all values of observation modes for EUI, PHI, METIS, SOLOHI and SPICE, and the number is 329(i don't really know if it covers all but it should) out of this 244 are of SPICE.

How did you fetch them? We should add a script that fetches them and saves them to a json file. We should make sure we do this with any fixed values we store.

I don't really know how reliable my method was, I queried data over time that covers all data of instruments and then downloaded JSON files of it for every instrument and ran a python script over that data, to extract unique values of Observation mode in it.

nabobalis commented 1 month ago

So I tried to fetch all values of observation modes for EUI, PHI, METIS, SOLOHI and SPICE, and the number is 329(i don't really know if it covers all but it should) out of this 244 are of SPICE.

How did you fetch them? We should add a script that fetches them and saves them to a json file. We should make sure we do this with any fixed values we store.

I don't really know how reliable my method was, I queried data over time that covers all data of instruments and then downloaded JSON files of it for every instrument and ran a python script over that data, to extract unique values of Observation mode in it.

Thats a decent place to start but we should ask the SOAR if there is an endpoint we can use to get this information.

NucleonGodX commented 1 month ago

So I tried to fetch all values of observation modes for EUI, PHI, METIS, SOLOHI and SPICE, and the number is 329(i don't really know if it covers all but it should) out of this 244 are of SPICE.

How did you fetch them? We should add a script that fetches them and saves them to a json file. We should make sure we do this with any fixed values we store.

I don't really know how reliable my method was, I queried data over time that covers all data of instruments and then downloaded JSON files of it for every instrument and ran a python script over that data, to extract unique values of Observation mode in it.

Thats a decent place to start but we should ask the SOAR if there is an endpoint we can use to get this information.

Yeah, that will be ideal.

herroyalmaj commented 1 month ago

Hi, I might have missed something here, but the lists can be got using SELECT DISTINCT observation_mode FROM v_<instrument>_sc_fits Is that what was wanted? They seem to be very individual to each instrument so I'm not sure how you plan on using them?

NucleonGodX commented 1 month ago

Hi, I might have missed something here, but the lists can be got using SELECT DISTINCT observation_mode FROM v_<instrument>_sc_fits Is that what was wanted? They seem to be very individual to each instrument so I'm not sure how you plan on using them?

Yes, this does the job, Thanks

nabobalis commented 1 month ago

Hi, I might have missed something here, but the lists can be got using SELECT DISTINCT observation_mode FROM v_<instrument>_sc_fits Is that what was wanted? They seem to be very individual to each instrument so I'm not sure how you plan on using them?

My inspiration is from IRIS where there are OBSID and people can filter by those observation modes if they are after a specific set of observation characteristic. I have assumed these are similar for SoLo and hope that users might find usefulness in filtering via that keyword.

NucleonGodX commented 1 month ago

@nabobalis how would you want the how-to guide for this look like? Like how should we navigate the user?

nabobalis commented 1 month ago

@nabobalis how would you want the how-to guide for this look like? Like how should we navigate the user?

Hmm, I am worried that simple how to guides defeat the purpose of a how to but maybe that's ok?

I would start off by saying showing a subset of what observation modes are available, by printing the net attr.

Do we know if there is any documentation about it on the SOAR or instrument websites?

Then I would filter by an observation mode and I would warn that if you do multi instrument search with the observation mode filter, there will be only results for the valid instrument? showcasing how to chain them together would be nice.

hayesla commented 1 month ago

Hmm, I thought maybe we wouldnt go ahead with this. Looking at the different observing modes, will users actually know what to do here? I'm not sure it adds useful functionality. And its quite different to the OBSID that IRIS uses?

I'm in favor of not adding this at the moment, as its quite instrument specific and not clear what these different modes even are. Like theres also no explicit info in how we provide these to what instrument they are associated with.

hayesla commented 1 month ago

or if we do add it, it just is added to the returned table, rather than having it as an attribute we can search on. The ObservingMode attribute could mean many things, and I personally think it going to confuse users. I need to think a little bit about this, but I'm still in favor of not having it at the moment.