Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in
bilby
bilby
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 20
    • Issues 20
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 16
    • Merge Requests 16
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • Container Registry
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • lscsoft
  • bilbybilby
  • Issues
  • #384

Closed
Open
Opened Jun 25, 2019 by Sylvia Biscoveanu@sylvia.biscoveanu
  • Report abuse
  • New issue
Report abuse New issue

Unable to read prior files that have parentheses in the latex label

When trying to load a prior file with version 0.5.2 that has the following parameter log10_E0 = Uniform(name='log10_E0', minimum=47, maximum=54, latex_label=r'$\log(E_{0})$'), I am now getting a new error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sylvia.biscoveanu/.local/lib/python2.7/site-packages/bilby-0.5.2-py2.7.egg/bilby/core/prior.py", line 42, in __init__
    self.from_file(filename)
  File "/home/sylvia.biscoveanu/.local/lib/python2.7/site-packages/bilby-0.5.2-py2.7.egg/bilby/core/prior.py", line 131, in from_file
    prior[key] = cls.from_repr(args)
  File "/home/sylvia.biscoveanu/.local/lib/python2.7/site-packages/bilby-0.5.2-py2.7.egg/bilby/core/prior.py", line 682, in from_repr
    kwargs = cls._split_repr(string)
  File "/home/sylvia.biscoveanu/.local/lib/python2.7/site-packages/bilby-0.5.2-py2.7.egg/bilby/core/prior.py", line 699, in _split_repr
    args[ii] = ','.join([args[ii], args[ii + 1]]).strip()
IndexError: list index out of range

I think this is because the _split_repr function can't handle latex labels that have parentheses. I don't think having parentheses in the label is super uncommon, so we should come up with a fix for this.

Related issues

  • Discussion
  • Designs
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: lscsoft/bilby#384