gammapy / gamma-sky

Portal to the gamma-ray sky
http://gamma-sky.net/
MIT License
6 stars 3 forks source link

Configure source detail pages for TeV catalog #73

Closed vorugantia closed 7 years ago

vorugantia commented 7 years ago

So far, I have done the following in this PR:

@cdeil - I wanted to open the PR now so that you could have a look and tell me what to edit now. Run the make.py commands, call npm start and have a look at a TeV detail page. So far, I think I should fix the following:

  1. Use spacing so that the values are all listed at the same spot vertically.
  2. Any value that is null shows up as nothing in the HTML, but the units still show (i.e. Vela X prints Position error: deg). How should I fix this? Perhaps from the Python side I can just change all NaN values to "null", instead of null?

Let me know if there is anything else I should fix.

cdeil commented 7 years ago

Use spacing so that the values are all listed at the same spot vertically.

Is it really better readable if vertically aligned? Or is it about the same or even better to just do no vertical alignment at all?

Before spending much time on that, I would suggest you do a few values in the two styles and show a screenshot.


The app doesn't work for me. In the console I see failed GET requests e.g. to http://localhost:4200/data/cat/3fgl/cat.json .

I did generate the files with the Python script, and it put them here: src/app/data/cat/3fgl/cat.json

Did you forget to commit some change? Can you come by my office and we have a look / discuss?


I'm not sure how to best surface missing data in the UI. Yes, what you have now with "Position error: deg" is no good. Two options which I find roughly equally good:

I think in any case, this requires an "if" statement either in the HTML template or in your TS code on the catalog source class. Another option would be to do this "transform to UI presentation" in Python, i.e. directly generate the strings you then surface in the app there. I think this isn't a great solution though, and would suggest to just transmit the numbers / missing data via None in the JSON files, and do the UI presentation in TS or HTML.

vorugantia commented 7 years ago

Ok, I've made all of the changes you suggested. You mentioned a few minor changes that I can add after tests etc. - I will keep those in mind.