Changeset 6ca38f3 in sasview for invariantview


Ignore:
Timestamp:
Aug 3, 2010 7:20:39 AM (14 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
5b03122
Parents:
186c4eb
Message:

used better symbols for % and +_ on report(html_window)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/invariant_state.py

    r178bfea r6ca38f3  
    226226                except: 
    227227                    pass 
    228                 state += "(%s %s)"%(format_number(value),'o/o') 
     228                state += "(%s %s)"%(format_number(value),'%') 
    229229            # Outputs 
    230230            else: 
     
    486486                    s_10 = item[1] 
    487487                elif item[0] == "volume fraction": 
    488                     s_17 = item[1] 
     488                    val=item[1].split("+-")[0].strip() 
     489                    error = item[1].split("+-")[1].strip() 
     490                    s_17 = val+" &plusmn; "+error 
    489491                elif item[0] == "specific surface": 
    490                     s_18 = item[1] 
     492                    val=item[1].split("+-")[0].strip() 
     493                    error = item[1].split("+-")[1].strip() 
     494                    s_18 = val+" &plusmn; "+error 
    491495                elif item[0].split("(")[0].strip()=="power high": 
    492496                    s_11 = item[0]+" ="+item[1] 
     
    494498                    s_12 = item[0]+" ="+item[1] 
    495499                elif item[0].split("[")[0].strip()=="Q* from low Q extrapolation": 
    496                     s_13 = item[1] 
     500                    #looks messy but this way the symbols +_ and % work on html 
     501                    val=item[1].split("+-")[0].strip() 
     502                    error = item[1].split("+-")[1].strip() 
     503                    err = error.split("%")[0].strip() 
     504                    percent = error.split("%")[1].strip() 
     505                    s_13 = val+" &plusmn; "+err+"&#37"+percent 
    497506                elif item[0].split("[")[0].strip()=="Q* from data": 
    498                     s_14 = item[1] 
     507                    val=item[1].split("+-")[0].strip() 
     508                    error = item[1].split("+-")[1].strip() 
     509                    err = error.split("%")[0].strip() 
     510                    percent = error.split("%")[1].strip() 
     511                    s_14 = val+" &plusmn; "+err+"&#37"+percent 
    499512                elif item[0].split("[")[0].strip()=="Q* from high Q extrapolation": 
    500                     s_15 = item[1] 
     513                    val=item[1].split("+-")[0].strip() 
     514                    error = item[1].split("+-")[1].strip() 
     515                    err = error.split("%")[0].strip() 
     516                    percent = error.split("%")[1].strip() 
     517                    s_15 = val+" &plusmn; "+err+"&#37"+percent 
    501518                elif item[0].split("[")[0].strip()=="total Q*": 
    502                     s_16 = item[1] 
     519                    val=item[1].split("+-")[0].strip() 
     520                    error = item[1].split("+-")[1].strip() 
     521                    s_16 = val+" &plusmn; "+error 
    503522                else: 
    504523                    continue 
Note: See TracChangeset for help on using the changeset viewer.