diff --git a/trimsp/src/TrimSPGUI4/TrimSPGUI4.pm b/trimsp/src/TrimSPGUI4/TrimSPGUI4.pm index 7771292..7ffc42f 100644 --- a/trimsp/src/TrimSPGUI4/TrimSPGUI4.pm +++ b/trimsp/src/TrimSPGUI4/TrimSPGUI4.pm @@ -360,13 +360,16 @@ sub CreateInpFile $All{$LComp} = $Comp; my %LElComp=Chem::parse_formula($Comp); foreach my $key (keys %LElComp) { - if ($key eq "") { +# Check if composition is understood + if ($key eq "" || Chem::Zof($key) eq "") { $Check++; } + } if ($Comp eq "") {$Check++;} # Write composition to results file header + # Densities of layers my $Lrho="L".$i."rho"; my $rho = this->{ui}->layerTable->item($i-1,1)->text(); @@ -381,7 +384,7 @@ sub CreateInpFile # Sanity check, is the layer supposed to have value? are they all there? if ($Check!=0) { - my $ErrMsg="Error: Layer $i is empty or bad chemical formula.\nPleach check!\n"; + my $ErrMsg="Error: Bad chemical formula in Layer $i.\nPleach check!\n"; print STDERR $ErrMsg; my $HelpWindow = Qt::MessageBox::information( this, "Error!",$ErrMsg); return("ERROR"); diff --git a/trimsp/src/plotRge.C b/trimsp/src/plotRge.C index 224da00..20f8e75 100644 --- a/trimsp/src/plotRge.C +++ b/trimsp/src/plotRge.C @@ -50,23 +50,9 @@ void plotRge(TString &names) Int_t col; - Int_t color[1000]; - for (i=0; i<1000; i++) - color[i] = -1; - color[0] = TColor::kRed; - color[1] = TColor::kGreen; - color[2] = TColor::kBlue; - color[3] = TColor::kMagenta; - color[4] = TColor::kOrange; - color[5] = TColor::kViolet; - color[6] = TColor::kAzure+7; - color[7] = TColor::kOrange+4; - color[8] = TColor::kBlue-7; - TGraph *rge[1000]; TMultiGraph *mg = new TMultiGraph(); - TLegend *legend = new TLegend(0.7, 0.7, 0.95, 0.95); legend->SetFillColor(TColor::GetColor(255,255,255)); // white @@ -115,16 +101,10 @@ void plotRge(TString &names) } rge[i] = new TGraph(nStep, depth, normStop); - if (color[i] >= 0) { - rge[i]->SetMarkerColor(color[i]); - rge[i]->SetLineColor(color[i]); - } else { - TRandom *rand = new TRandom(i); - col = TColor::GetColor((Int_t)rand->Integer(255),(Int_t)rand->Integer(255),(Int_t)rand->Integer(255)); - rge[i]->SetMarkerColor(col); - rge[i]->SetLineColor(col); - delete rand; - } + col = TColor::GetColorBright(i+1); + rge[i]->SetMarkerColor(col); + rge[i]->SetLineColor(col); + rge[i]->SetMarkerStyle(20); mg->Add(rge[i]);