jacopo-chevallard / PyP-BEAGLE

4 stars 1 forks source link

Issues with --plot-triangle and --plot-marginal #25

Closed jacopo-chevallard closed 7 years ago

jacopo-chevallard commented 7 years ago

@prtc writes

--plot-triangle gets stuck with a
  File "/Users/pcoelho/anaconda/lib/python2.7/json/decoder.py", line 380, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 22 column 1 (char 327)
--plot-marginal gives the error
  File "/Users/pcoelho/anaconda/lib/python2.7/site-packages/astropy/io/fits/column.py", line 1846, in _get_index
    raise KeyError("Key '%s' does not exist." % key)
KeyError: "Key 'ID' does not exist."
and when passing the name of the column containing the object ID with the option
--ID-key galaxy_id
it gets stuck at a message (without exiting the script though)
ValueError: 
\lambda_\textnormal{eff} / \textnormal{\AA}
          ^
Expected {snowflake | accent | symbol | c_over_c | function | group | frac | stackrel | binom | genfrac | sqrt | overline | operatorname} (at char 10), (line:1, col:11)
<\pre>

jacopo-chevallard commented 7 years ago
File "/Users/pcoelho/anaconda/lib/python2.7/json/decoder.py", line 380, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 22 column 1 (char 327)

This looks like a problem with the parsing of the JSON file, you can use this site https://jsonlint.com/ to check that the JSON file syntax is correct

\lambda_\textnormal{eff} / \textnormal{\AA}

This is a problem with LaTeX, can you check if your matplotlib configuration file (normally in ~/.matplotlib/matplotlibrc) contains the line

text.usetex         : True 
prtc commented 7 years ago

many thanks. i’ll check both things and get back to you here.

prtc commented 7 years ago

This is a problem with LaTeX, can you check if your matplotlib configuration file (normally in >~/.matplotlib/matplotlibrc) contains the line

text.usetex : True

Indeed I haven't. For some reason .matplotlib/matplotlibrc is being ignored. So I had to correct it at /home/beagle/anaconda2/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc.

I did, then I got the message

UserWarning: matplotlibrc text.usetex can not be used with *Agg backend unless dvipng-1.5 or later is installed on your system

I installed, then pyp-beagle --plot-marginal run without complaining.

i'll look at the json file now.

prtc commented 7 years ago

This looks like a problem with the parsing of the JSON file, you can use this site https://jsonlint.com/ to check that the JSON file syntax is correct

correct, there was a mistake in the json that the site helped me locate. so this is fixed, a few triangles plot generated (nice plots btw).

many thanks. closing this.