Changeset 7651 for trunk/projects/slimplugin
 Timestamp:
 03/15/11 20:15:15 (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/projects/slimplugin/src/main/java/loci/slim/analysis/plugins/Display.java
r7603 r7651 45 45 import java.math.RoundingMode; 46 46 47 import java.util. HashMap;47 import java.util.LinkedHashMap; 48 48 import java.util.Map; 49 49 … … 67 67 @SLIMAnalyzer(name="Display Fit Results") 68 68 public class Display implements ISLIMAnalyzer { 69 private static final int C_INDEX = 1; 69 private static final int X2_INDEX = 0; 70 private static final int Z_INDEX = 1; 70 71 private static final int A1_INDEX = 2; 71 72 private static final int T1_INDEX = 3; … … 74 75 private static final int A3_INDEX = 6; 75 76 private static final int T3_INDEX = 7; 77 private static final String X2 = "" + 'X' + '2'; //TODO use Unicode 76 78 private static final Character TAU = 'T'; //TODO IJ1 doesn't display Unicode, was: = '\u03c4'; 77 79 private static final String T = "" + TAU; … … 95 97 private static final String A2_A3 = "A2/A3"; 96 98 private static final String A3_A2 = "A3/A2"; 97 private static final String C = "C";99 private static final String Z = "Z"; 98 100 99 101 private static final boolean MIN = true; … … 113 115 //TODO need Ta, Ti, Tm 114 116 private static enum Formula { 117 X2_FORMULA(X2, X2_INDEX), 115 118 T_FORMULA(T, T1_INDEX), 116 119 T1_FORMULA(T1, T1_INDEX), … … 133 136 A2_A3_FORMULA(A2_A3, A2_INDEX, A3_INDEX), 134 137 A3_A2_FORMULA(A3_A2, A3_INDEX, A2_INDEX), 135 C_FORMULA(C, C_INDEX);138 Z_FORMULA(Z, Z_INDEX); 136 139 137 140 // This contains the displayable name … … 366 369 */ 367 370 private Map<String, Formula[]> initFormulasMap(FitFunction function) { 368 Map<String, Formula[]> map = new HashMap<String, Formula[]>();371 Map<String, Formula[]> map = new LinkedHashMap<String, Formula[]>(); 369 372 switch (function) { 370 373 case SINGLE_EXPONENTIAL: 371 map.put("T", new Formula[] { 374 map.put("X2 A T C", new Formula[] { 375 Formula.X2_FORMULA, 376 Formula.A_FORMULA, 377 Formula.T_FORMULA, 378 Formula.Z_FORMULA }); 379 map.put("X2 A T", new Formula[] { 380 Formula.X2_FORMULA, 381 Formula.A_FORMULA, 372 382 Formula.T_FORMULA }); 383 map.put("X2 T", new Formula[] { 384 Formula.X2_FORMULA, 385 Formula.T_FORMULA }); 386 map.put("X2", new Formula[] { 387 Formula.X2_FORMULA }); 388 map.put("A T C", new Formula[] { 389 Formula.A_FORMULA, 390 Formula.T_FORMULA, 391 Formula.Z_FORMULA }); 373 392 map.put("A T", new Formula[] { 374 393 Formula.A_FORMULA, 375 394 Formula.T_FORMULA }); 376 map.put("A T C", new Formula[] { 377 Formula.A_FORMULA, 378 Formula.T_FORMULA, 379 Formula.C_FORMULA }); 380 break; 395 map.put("T", new Formula[] { 396 Formula.T_FORMULA }); 397 break; 381 398 case DOUBLE_EXPONENTIAL: 382 map.put("T1/T2", new Formula[] { 399 map.put("X2 A1 A2 T1 T2 C", new Formula[] { 400 Formula.X2_FORMULA, 401 Formula.A1_FORMULA, 402 Formula.A2_FORMULA, 403 Formula.T1_FORMULA, 404 Formula.T2_FORMULA, 405 Formula.Z_FORMULA }); 406 map.put("X2 A1 A2 T1 T2", new Formula[] { 407 Formula.X2_FORMULA, 408 Formula.A1_FORMULA, 409 Formula.A2_FORMULA, 410 Formula.T1_FORMULA, 411 Formula.T2_FORMULA }); 412 map.put("X2 T1 T2", new Formula[] { 413 Formula.X2_FORMULA, 414 Formula.T1_FORMULA, 415 Formula.T2_FORMULA }); 416 map.put("X2 A1/A2 T1/T2", new Formula[] { 417 Formula.X2_FORMULA, 418 Formula.A1_A2_FORMULA, 383 419 Formula.T1_T2_FORMULA }); 420 map.put("X2 T1/T2", new Formula[] { 421 Formula.X2_FORMULA, 422 Formula.T1_T2_FORMULA }); 423 map.put("X2", new Formula[] { 424 Formula.X2_FORMULA }); 425 map.put("A1 A2 T1 T2 C", new Formula[] { 426 Formula.A1_FORMULA, 427 Formula.A2_FORMULA, 428 Formula.T1_FORMULA, 429 Formula.T2_FORMULA, 430 Formula.Z_FORMULA }); 431 map.put("A1 A2 T1 T2", new Formula[] { 432 Formula.A1_FORMULA, 433 Formula.A2_FORMULA, 434 Formula.T1_FORMULA, 435 Formula.T2_FORMULA }); 436 map.put("T1 T2", new Formula[] { 437 Formula.T1_FORMULA, 438 Formula.T2_FORMULA }); 384 439 map.put("A1/A2 T1/T2", new Formula[] { 385 440 Formula.A1_A2_FORMULA, 386 441 Formula.T1_T2_FORMULA }); 387 map.put("T1 T2", new Formula[] { 388 Formula.T1_FORMULA, 389 Formula.T2_FORMULA }); 390 map.put("A1 A2 T1 T2", new Formula[] { 442 map.put("T1/T2", new Formula[] { 443 Formula.T1_T2_FORMULA }); 444 break; 445 case TRIPLE_EXPONENTIAL: 446 map.put("X2 A1 A2 A3 T1 T2 T3 C", new Formula[] { 447 Formula.X2_FORMULA, 391 448 Formula.A1_FORMULA, 392 449 Formula.A2_FORMULA, 393 Formula.T1_FORMULA, 394 Formula.T2_FORMULA }); 395 map.put("A1 A2 T1 T2 C", new Formula[] { 450 Formula.A3_FORMULA, 451 Formula.T1_FORMULA, 452 Formula.T2_FORMULA, 453 Formula.T3_FORMULA, 454 Formula.Z_FORMULA }); 455 map.put("X2 A1 A2 A3 T1 T2 T3", new Formula[] { 456 Formula.X2_FORMULA, 396 457 Formula.A1_FORMULA, 397 458 Formula.A2_FORMULA, 459 Formula.A3_FORMULA, 398 460 Formula.T1_FORMULA, 399 461 Formula.T2_FORMULA, 400 Formula.C_FORMULA }); 401 break; 402 case TRIPLE_EXPONENTIAL: 403 map.put("T1/T2 T1/T3", new Formula[] { 462 Formula.T3_FORMULA }); 463 map.put("X2 T1 T2 T3", new Formula[] { 464 Formula.X2_FORMULA, 465 Formula.T1_FORMULA, 466 Formula.T2_FORMULA, 467 Formula.T3_FORMULA }); 468 map.put("X2 A1/A2 A1/A3 T1/T2 T1/T3", new Formula[] { 469 Formula.X2_FORMULA, 470 Formula.A1_A2_FORMULA, 471 Formula.A1_A3_FORMULA, 404 472 Formula.T1_T2_FORMULA, 405 473 Formula.T1_T3_FORMULA }); 474 map.put("X2 T1/T2 T1/T3", new Formula[] { 475 Formula.X2_FORMULA, 476 Formula.T1_T2_FORMULA, 477 Formula.T1_T3_FORMULA }); 478 map.put("X2", new Formula[] { 479 Formula.X2_FORMULA }); 480 map.put("A1 A2 A3 T1 T2 T3 C", new Formula[] { 481 Formula.A1_FORMULA, 482 Formula.A2_FORMULA, 483 Formula.A3_FORMULA, 484 Formula.T1_FORMULA, 485 Formula.T2_FORMULA, 486 Formula.T3_FORMULA, 487 Formula.Z_FORMULA }); 488 map.put("A1 A2 A3 T1 T2 T3", new Formula[] { 489 Formula.A1_FORMULA, 490 Formula.A2_FORMULA, 491 Formula.A3_FORMULA, 492 Formula.T1_FORMULA, 493 Formula.T2_FORMULA, 494 Formula.T3_FORMULA }); 495 map.put("T1 T2 T3", new Formula[] { 496 Formula.T1_FORMULA, 497 Formula.T2_FORMULA, 498 Formula.T3_FORMULA }); 406 499 map.put("A1/A2 A1/A3 T1/T2 T1/T3", new Formula[] { 407 500 Formula.A1_A2_FORMULA, … … 409 502 Formula.T1_T2_FORMULA, 410 503 Formula.T1_T3_FORMULA }); 411 map.put("T1 T2 T3", new Formula[] { 412 Formula.T1_FORMULA, 413 Formula.T2_FORMULA, 414 Formula.T3_FORMULA }); 415 map.put("A1 A2 A3 T1 T2 T3", new Formula[] { 416 Formula.A1_FORMULA, 417 Formula.A2_FORMULA, 418 Formula.A3_FORMULA, 419 Formula.T1_FORMULA, 420 Formula.T2_FORMULA, 421 Formula.T3_FORMULA }); 422 map.put("A1 A2 A3 T1 T2 T3 C", new Formula[] { 423 Formula.A1_FORMULA, 424 Formula.A2_FORMULA, 425 Formula.A3_FORMULA, 426 Formula.T1_FORMULA, 427 Formula.T2_FORMULA, 428 Formula.T3_FORMULA, 429 Formula.C_FORMULA }); 504 map.put("T1/T2 T1/T3", new Formula[] { 505 Formula.T1_T2_FORMULA, 506 Formula.T1_T3_FORMULA }); 430 507 break; 431 508 case STRETCHED_EXPONENTIAL:
Note: See TracChangeset
for help on using the changeset viewer.