Changes in / [327:5f6c2da60381:333:ea6889086fc9]
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgtags
r326 r333 7 7 b47c44506c830cd63d62d77300daa714fdf80fee hg_start 8 8 e62158696bc29ddd771699760c58742568b25688 pf-0.9.1 9 b2ed9015dfb7c96fd5566f0ff62c0afcfba63299 Makefile10 5de30e5cfcc2d03adc6c6350ffd94a114af4e807 Makefilea11 5de30e5cfcc2d03adc6c6350ffd94a114af4e807 Makefilea12 0000000000000000000000000000000000000000 Makefilea13 0000000000000000000000000000000000000000 Makefilea14 0000000000000000000000000000000000000000 Makefilea15 b2ed9015dfb7c96fd5566f0ff62c0afcfba63299 Makefile16 0000000000000000000000000000000000000000 Makefile17 0000000000000000000000000000000000000000 Makefile18 0000000000000000000000000000000000000000 Makefile19 9 c038d471343d129210a47183df19fd5482254d96 pf-0.9.3 20 10 6a5437ba9e4db5924d84f3e162e1b6ca8a17666c qx-1.5.1 21 5045634f136c9761cd5d84ed0ec82bc926c4613c qx-1_0_2 22 0000000000000000000000000000000000000000 qx-1_0_2 23 b9efbf5ce6d35d35b93f0da6ff4bce144d42ba0a qx-1_1_1 24 0000000000000000000000000000000000000000 qx-1_1_1 25 89f0b2d9b6e22306e8f4563c51218659429a9b57 qx-1_3_1 26 0000000000000000000000000000000000000000 qx-1_3_1 27 822641d9288c0f8b623411e0419f1bc33b868a09 qx-1_2 28 0000000000000000000000000000000000000000 qx-1_2 11 38122f4e5fa6733e2c6cad853e6a1aeedb908ef6 qx-2.0.1 -
config.json
r309 r315 32 32 { 33 33 "APPLICATION" : "pf", 34 "QOOXDOO_PATH" : "/usr/local/share/qooxdoo/ 1.6.1",34 "QOOXDOO_PATH" : "/usr/local/share/qooxdoo/2.0.1", 35 35 "QXTHEME" : "pf.theme.Modern", 36 36 "API_EXCLUDE" : ["qx.test.*", "${APPLICATION}.theme.*"], 37 "OPTIMIZE" : ["basecalls", "privates" ],37 "OPTIMIZE" : ["basecalls", "privates", "whitespace", "comments"], 38 38 "LOCALES" : [ "en" ], 39 39 "CACHE" : "${TMPDIR}/cache", -
source/class/pf/Application.js
r327 r333 2475 2475 createSaveLoadDialog : function() 2476 2476 { 2477 var w, rc1, e, btn;2477 var w, layout, rc1, e, btn; 2478 2478 // "Save as..." dialog 2479 2479 w = new pf.ui.DialogWindow(); … … 2490 2490 var btn_rename = new qx.ui.toolbar.Button("Rename", 2491 2491 "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"); 2492 2496 btn_delete.setEnabled(false); 2493 2497 btn_rename.setEnabled(false); 2498 btn_export.setEnabled(false); 2494 2499 tbpart.add(btn_delete); 2495 2500 tbpart.add(btn_rename); 2501 tbpart.add(new qx.ui.toolbar.Separator()); 2502 tbpart.add(btn_export); 2503 tbpart.add(btn_import); 2496 2504 tb.add(tbpart); 2497 2505 w.add(tb); … … 2525 2533 var sm = lv.getSelectionModel(); 2526 2534 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); 2527 2608 2528 2609 btn_delete.addListener("execute", function(ev) { … … 2551 2632 var name = rowData[0]; 2552 2633 2553 2554 2634 this.promptDialog.prompt("Rename \"" + name + "\" to", 2555 2635 name, function(newname) { … … 2567 2647 }, this); 2568 2648 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 2569 2702 e = new qx.ui.form.TextField(); 2570 2703 e.setMarginTop(1); … … 2577 2710 btn_delete.setEnabled(false); 2578 2711 btn_rename.setEnabled(false); 2712 btn_export.setEnabled(false); 2579 2713 } else { 2580 2714 var index = sm.getLeadSelectionIndex(); … … 2583 2717 btn_rename.setEnabled(true); 2584 2718 btn_delete.setEnabled(true); 2719 btn_export.setEnabled(true); 2585 2720 } 2586 2721 }); 2587 2722 2588 varlayout = new qx.ui.layout.HBox(10, "right");2723 layout = new qx.ui.layout.HBox(10, "right"); 2589 2724 rc1 = new qx.ui.container.Composite(layout); 2590 2725 rc1.setMargin(10, 10, 10, 10); … … 2748 2883 var btn3 = new qx.ui.form.RadioButton("Simple"); 2749 2884 btn3.setModel("simple"); 2885 var btn4 = new qx.ui.form.RadioButton("Indigo"); 2886 btn4.setModel("indigo"); 2750 2887 2751 2888 fr.add(btn1); 2752 2889 fr.add(btn2); 2753 2890 fr.add(btn3); 2754 2755 var rm = new qx.ui.form.RadioGroup(btn1, btn2, btn3); 2891 fr.add(btn4); 2892 2893 var rm = new qx.ui.form.RadioGroup(btn1, btn2, btn3, btn4); 2756 2894 var sels; 2757 2895 switch (this.prefs.themeName) { … … 2761 2899 case "simple": 2762 2900 sels = new Array(btn3); 2901 break; 2902 case "indigo": 2903 sels = new Array(btn4); 2763 2904 break; 2764 2905 default: … … 2787 2928 theme = qx.theme.Simple; 2788 2929 break; 2930 case "indigo": 2931 theme = qx.theme.Indigo; 2932 break; 2789 2933 default: 2790 2934 theme = pf.theme.Modern; … … 2848 2992 this.bl_top = new qx.ui.container.Composite(layout); 2849 2993 2850 this.doc.add(this.bl_top, {width : '100%', height: "100%"});2994 this.doc.add(this.bl_top, {width :"100%", height: "100%"}); 2851 2995 2852 2996 // The menubar -
source/class/pf/Plasma.js
r305 r317 259 259 }, 260 260 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 261 273 getAlfvenVelocity: function() 262 274 { … … 331 343 this.i.getMassDensity() + 332 344 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); 333 360 }, 334 361 -
source/entities.js
r308 r318 136 136 }, 137 137 { 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 { 138 146 id : "Fine_structure", 139 147 name : "Fine structure", … … 145 153 }, 146 154 { 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 { 147 164 id : "doppler_fwhm", 148 165 name : "Doppler FWHM", … … 154 171 }, 155 172 { 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 { 156 182 id : "zeeman_splitting", 157 183 name : "Zeeman splitting", … … 162 188 }, 163 189 { 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 { 164 198 id : "total_stark_fwhm", 165 199 name : "Total Stark FWHM", … … 170 204 }, 171 205 { 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 { 172 214 id : "stark_fwhm", 173 215 name : "Stark FWHM", … … 223 265 formula : "this.plasma.getFermiEnergy()", 224 266 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" 225 285 }, 226 286 { … … 296 356 section : "spectroscopy", 297 357 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()", 298 368 wikiLink : "Einstein_coefficients" 299 369 },
Note: See TracChangeset
for help on using the changeset viewer.