Skip to content

Support Non-Standard Formatting in ParaFrame #4

@rndsrc

Description

@rndsrc

In EHT simulation libraries, the spin values are usually labeled by a-0.94, a-0.5, a0, a+0.5, and a+0.94. Unfortunately, this is not standard python number formatting because

f'{0.5:g}' -> '0.5'
f'{0.0:g}' -> '0'
f'{-.5:g}' -> '-0.5'
f'{0.5:+g}' -> '+0.5'
f'{0.0:+g}' -> '+0'
f'{-.5:+g}' -> '-0.5'

While creating the EHT convention programmatically is not too complicated (with condition statements), parsing with hallmark.ParaFrame is only supported if the spin values are treated as strings, which is annoying for filtering.

It will be great if we can create a pythonic mechanism to pass in special formatting functions.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions