Ignore:
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • .hgtags

    r333 r326  
    77b47c44506c830cd63d62d77300daa714fdf80fee hg_start
    88e62158696bc29ddd771699760c58742568b25688 pf-0.9.1
     9b2ed9015dfb7c96fd5566f0ff62c0afcfba63299 Makefile
     105de30e5cfcc2d03adc6c6350ffd94a114af4e807 Makefilea
     115de30e5cfcc2d03adc6c6350ffd94a114af4e807 Makefilea
     120000000000000000000000000000000000000000 Makefilea
     130000000000000000000000000000000000000000 Makefilea
     140000000000000000000000000000000000000000 Makefilea
     15b2ed9015dfb7c96fd5566f0ff62c0afcfba63299 Makefile
     160000000000000000000000000000000000000000 Makefile
     170000000000000000000000000000000000000000 Makefile
     180000000000000000000000000000000000000000 Makefile
    919c038d471343d129210a47183df19fd5482254d96 pf-0.9.3
    10206a5437ba9e4db5924d84f3e162e1b6ca8a17666c qx-1.5.1
    11 38122f4e5fa6733e2c6cad853e6a1aeedb908ef6 qx-2.0.1
     215045634f136c9761cd5d84ed0ec82bc926c4613c qx-1_0_2
     220000000000000000000000000000000000000000 qx-1_0_2
     23b9efbf5ce6d35d35b93f0da6ff4bce144d42ba0a qx-1_1_1
     240000000000000000000000000000000000000000 qx-1_1_1
     2589f0b2d9b6e22306e8f4563c51218659429a9b57 qx-1_3_1
     260000000000000000000000000000000000000000 qx-1_3_1
     27822641d9288c0f8b623411e0419f1bc33b868a09 qx-1_2
     280000000000000000000000000000000000000000 qx-1_2
  • config.json

    r315 r309  
    3232  {
    3333    "APPLICATION"  : "pf",
    34     "QOOXDOO_PATH" : "/usr/local/share/qooxdoo/2.0.1",
     34    "QOOXDOO_PATH" : "/usr/local/share/qooxdoo/1.6.1",
    3535    "QXTHEME"      : "pf.theme.Modern",
    3636    "API_EXCLUDE"  : ["qx.test.*", "${APPLICATION}.theme.*"],
    37     "OPTIMIZE"     : ["basecalls", "privates", "whitespace", "comments"],
     37    "OPTIMIZE"     : ["basecalls", "privates"],
    3838    "LOCALES"      : [ "en" ],
    3939    "CACHE"        : "${TMPDIR}/cache",
  • source/class/pf/Application.js

    r333 r327  
    24752475        createSaveLoadDialog : function()
    24762476        {
    2477             var w, layout, rc1, e, btn;
     2477            var w, rc1, e, btn;
    24782478            // "Save as..." dialog
    24792479            w = new pf.ui.DialogWindow();
     
    24902490            var btn_rename = new qx.ui.toolbar.Button("Rename",
    24912491                "pf/image/rename.png");
    2492             var btn_export = new qx.ui.toolbar.Button("Export",
    2493                 "pf/image/export.png");
    2494             var btn_import = new qx.ui.toolbar.Button("Import",
    2495                 "pf/image/import.png");
    24962492            btn_delete.setEnabled(false);
    24972493            btn_rename.setEnabled(false);
    2498             btn_export.setEnabled(false);
    24992494            tbpart.add(btn_delete);
    25002495            tbpart.add(btn_rename);
    2501             tbpart.add(new qx.ui.toolbar.Separator());
    2502             tbpart.add(btn_export);
    2503             tbpart.add(btn_import);
    25042496            tb.add(tbpart);
    25052497            w.add(tb);
     
    25332525            var sm = lv.getSelectionModel();
    25342526            sm.setSelectionMode(qx.ui.table.selection.Model.SINGLE_SELECTION);
    2535            
    2536             // Export/import window
    2537             var eiw = new pf.ui.DialogWindow();
    2538             eiw.set({
    2539                 width:  350,
    2540                 height: 400
    2541             });
    2542             eiw.setResizable(true);
    2543             eiw.setLayout(new qx.ui.layout.VBox(0));
    2544             eiw.setContentPadding(0);
    2545            
    2546             var note = new qx.ui.basic.Label("Label", {height: 20});
    2547             eiw.add(note);
    2548                
    2549             var text_area = new qx.ui.form.TextArea();
    2550             text_area.setWrap(true);
    2551             eiw.add(text_area, {flex: 1});
    2552 
    2553 
    2554             layout = new qx.ui.layout.HBox(10, "right");
    2555             rc1 = new qx.ui.container.Composite(layout);
    2556             rc1.setMargin(10, 10, 10, 10);
    2557             eiw.add(rc1);
    2558 
    2559             btn = new qx.ui.form.Button("Cancel", "pf/image/cancel.png");
    2560             btn.addListener("execute", function(ev) {
    2561                     eiw.close();
    2562                 }, this);
    2563             rc1.add(btn);
    2564 
    2565             btn = new qx.ui.form.Button("OK", "pf/image/ok.png");
    2566             btn.addListener("execute", function(ev) {
    2567                     var type = eiw.getUserData("type");
    2568                     if (type == "import") {
    2569                         var configstr = text_area.getValue();
    2570                        
    2571                         var config;
    2572                         try {
    2573                             config = qx.lang.Json.parse(configstr);
    2574                         } catch (err) {
    2575                             this.error(err);
    2576                         }
    2577 
    2578                         if (config) {
    2579                             var name = config.name;
    2580                            
    2581                             var d = new Date();
    2582                             var time = d.getTime();
    2583            
    2584                             var configPtr = new Object;
    2585                             configPtr.name = name;
    2586                             configPtr.hash = time;
    2587                             configPtr.time = time;
    2588                            
    2589                             this.prefs.configPtrs.push(configPtr);
    2590                            
    2591                             var cookie_name = "pf_config_" + configPtr.hash;
    2592                             qx.bom.Cookie.set(cookie_name, configstr, 3650);
    2593                            
    2594                             this.savePreferences();
    2595                             this.updateSaveLoadList();
    2596                            
    2597                             eiw.close();
    2598                         } else {
    2599                             this.msgWindow.error("Cannot parse the configuration!");
    2600                         }
    2601                     } else {
    2602                         eiw.close();
    2603                     }
    2604                 }, this);
    2605             rc1.add(btn);
    2606            
    2607             this.doc.add(eiw);
    26082527
    26092528            btn_delete.addListener("execute", function(ev) {
     
    26322551                        var name = rowData[0];
    26332552                       
     2553                       
    26342554                        this.promptDialog.prompt("Rename \"" + name + "\" to",
    26352555                            name, function(newname) {
     
    26472567                }, this);
    26482568
    2649             btn_export.addListener("execute", function(ev) {
    2650                     if (!sm.isSelectionEmpty()) {
    2651                         var index = sm.getLeadSelectionIndex();
    2652                         var rowData = tm.getRowData(index);
    2653                         var name = rowData[0];
    2654                        
    2655                         var configPtr = this.getConfig(name);
    2656                         if (!configPtr) {
    2657                             return false;
    2658                         }
    2659 
    2660                         var cookie_name = "pf_config_" + configPtr.hash;
    2661 
    2662                         var configstr = qx.bom.Cookie.get(cookie_name);
    2663                         if (!configstr) {
    2664                             return false;
    2665                         }
    2666 
    2667                         var config = qx.lang.Json.parse(configstr);
    2668                         config.name = name;
    2669 
    2670                         text_area.setValue(
    2671                             qx.lang.Json.stringify(config, undefined, 4));
    2672                        
    2673                         eiw.setCaption("Export configuration")
    2674                         eiw.setIcon("pf/image/export.png");
    2675                         eiw.setUserData("type", "export");
    2676                        
    2677                         text_area.setReadOnly(true);
    2678                        
    2679                         var nstr =
    2680                             "Copy the contents below to a text editor and save";
    2681                         note.setValue(nstr);
    2682                        
    2683                         eiw.open();
    2684                     }
    2685                 }, this);
    2686 
    2687             btn_import.addListener("execute", function(ev) {
    2688                     eiw.setCaption("Import configuration")
    2689                     eiw.setIcon("pf/image/import.png");
    2690                     eiw.setUserData("type", "import");
    2691 
    2692                     text_area.setReadOnly(false);
    2693                     text_area.setValue("");
    2694 
    2695                     var nstr =
    2696                         "Copy a previously saved config to the space below";
    2697                     note.setValue(nstr);
    2698 
    2699                     eiw.open();
    2700                 }, this);
    2701 
    27022569            e = new qx.ui.form.TextField();
    27032570            e.setMarginTop(1);
     
    27102577                        btn_delete.setEnabled(false);
    27112578                        btn_rename.setEnabled(false);
    2712                         btn_export.setEnabled(false);
    27132579                    } else {
    27142580                        var index = sm.getLeadSelectionIndex();
     
    27172583                        btn_rename.setEnabled(true);
    27182584                        btn_delete.setEnabled(true);
    2719                         btn_export.setEnabled(true);
    27202585                    }
    27212586                });
    27222587           
    2723             layout = new qx.ui.layout.HBox(10, "right");
     2588            var layout = new qx.ui.layout.HBox(10, "right");
    27242589            rc1 = new qx.ui.container.Composite(layout);
    27252590            rc1.setMargin(10, 10, 10, 10);
     
    28832748            var btn3 = new qx.ui.form.RadioButton("Simple");
    28842749            btn3.setModel("simple");
    2885             var btn4 = new qx.ui.form.RadioButton("Indigo");
    2886             btn4.setModel("indigo");
    28872750           
    28882751            fr.add(btn1);
    28892752            fr.add(btn2);
    28902753            fr.add(btn3);
    2891             fr.add(btn4);
    2892            
    2893             var rm = new qx.ui.form.RadioGroup(btn1, btn2, btn3, btn4);
     2754           
     2755            var rm = new qx.ui.form.RadioGroup(btn1, btn2, btn3);
    28942756            var sels;
    28952757            switch (this.prefs.themeName) {
     
    28992761            case "simple":
    29002762                sels = new Array(btn3);
    2901                 break;
    2902             case "indigo":
    2903                 sels = new Array(btn4);
    29042763                break;
    29052764            default:
     
    29282787                theme = qx.theme.Simple;
    29292788                break;
    2930             case "indigo":
    2931                 theme = qx.theme.Indigo;
    2932                 break;
    29332789            default:
    29342790                theme = pf.theme.Modern;
     
    29922848            this.bl_top = new qx.ui.container.Composite(layout);
    29932849
    2994             this.doc.add(this.bl_top, {width :"100%", height: "100%"});
     2850            this.doc.add(this.bl_top, {width :'100%', height: "100%"});
    29952851
    29962852            // The menubar
  • source/class/pf/Plasma.js

    r317 r305  
    259259        },
    260260       
    261         getFermiVelocity: function()
    262         {
    263             return Math.sqrt(2*this.getFermiEnergy());
    264         },
    265        
    266         getFermiLength: function()
    267         {
    268             var n_e = this.e.getN();
    269             var E_F = this.getFermiEnergy();
    270             return Math.sqrt(E_F/(6*Math.PI*n_e));
    271         },
    272        
    273261        getAlfvenVelocity: function()
    274262        {
     
    343331                   this.i.getMassDensity() +
    344332                   this.r.getMassDensity();
    345         },
    346        
    347         // griem:1997a, Eq (7.75)
    348         getLteNe: function()
    349         {
    350             var Z_core = this.r.getZcore();
    351             var E12 = 3.0/8.0*Z_core*Z_core;
    352             return 5/Math.sqrt(Math.PI)*pf.base.Bohr.alpha3*
    353                 Math.pow(E12, 3)*Math.sqrt(2*this.e.getT());
    354         },
    355        
    356         dE2dWl: function(dE)
    357         {
    358             var E = this.r.getTransitionEnergy();
    359             return (2*Math.PI)*pf.base.Bohr.c*dE/(E*E);
    360333        },
    361334
  • source/entities.js

    r318 r308  
    136136    },
    137137    {
    138         id        : "natural_linewidth_wl",
    139         name      : "Natural linewidth (wl)",
    140         dimension : "length",
    141         nspecies  : 0,
    142         section   : "spectroscopy",
    143         formula   : "this.plasma.dE2dWl(this.plasma.r.getNaturalWidth())"
    144     },
    145     {
    146138        id        : "Fine_structure",
    147139        name      : "Fine structure",
     
    153145    },
    154146    {
    155         id        : "Fine_structure_wl",
    156         name      : "Fine structure (wl)",
    157         dimension : "length",
    158         nspecies  : 0,
    159         section   : "spectroscopy",
    160         formula   : "this.plasma.dE2dWl(this.plasma.r.getFineStructure())",
    161         wikiLink  : "Fine_structure"
    162     },
    163     {
    164147        id        : "doppler_fwhm",
    165148        name      : "Doppler FWHM",
     
    171154    },
    172155    {
    173         id        : "doppler_fwhm_wl",
    174         name      : "Doppler FWHM (wl)",
    175         dimension : "length",
    176         nspecies  : 0,
    177         section   : "spectroscopy",
    178         formula   : "this.plasma.dE2dWl(2*this.plasma.r.getDopplerHwhm())",
    179         wikiLink  : "Doppler_broadening"
    180     },
    181     {
    182156        id        : "zeeman_splitting",
    183157        name      : "Zeeman splitting",
     
    188162    },
    189163    {
    190         id        : "zeeman_splitting_wl",
    191         name      : "Zeeman splitting (wl)",
    192         dimension : "length",
    193         nspecies  : 0,
    194         section   : "spectroscopy",
    195         formula   : "this.plasma.dE2dWl(2*this.plasma.getZeemanSplitting())"
    196     },
    197     {
    198164        id        : "total_stark_fwhm",
    199165        name      : "Total Stark FWHM",
     
    204170    },
    205171    {
    206         id        : "total_stark_fwhm_wl",
    207         name      : "Total Stark FWHM (wl)",
    208         dimension : "length",
    209         nspecies  : 0,
    210         section   : "spectroscopy",
    211         formula   : "this.plasma.dE2dWl(2*this.plasma.getStarkHwhm())"
    212     },
    213     {
    214172        id        : "stark_fwhm",
    215173        name      : "Stark FWHM",
     
    265223        formula   : "this.plasma.getFermiEnergy()",
    266224        wikiLink  : "Fermi_energy"
    267     },
    268     {
    269         id        : "fermi_velocity",
    270         name      : "Fermi velocity",
    271         dimension : "velocity",
    272         nspecies  : 0,
    273         section   : "fundamental",
    274         formula   : "this.plasma.getFermiVelocity()",
    275         wikiLink  : "Fermi_velocity"
    276     },
    277     {
    278         id        : "fermi_length",
    279         name      : "Fermi screening length",
    280         dimension : "length",
    281         nspecies  : 0,
    282         section   : "fundamental",
    283         formula   : "this.plasma.getFermiLength()",
    284         wikiLink  : "Electric-field_screening"
    285225    },
    286226    {
     
    356296        section   : "spectroscopy",
    357297        formula   : "this.plasma.r.getEinsteinA()",
    358         wikiLink  : "Einstein_coefficients"
    359     },
    360 
    361     {
    362         id        : "LTE_parameter",
    363         name      : "LTE parameter",
    364         dimension : "none",
    365         nspecies  : 0,
    366         section   : "spectroscopy",
    367         formula   : "this.plasma.e.getN()/this.plasma.getLteNe()",
    368298        wikiLink  : "Einstein_coefficients"
    369299    },
Note: See TracChangeset for help on using the changeset viewer.