I am using BaselineRemoval library to correct the CA flux signal data. I am not able to understand why the y axis value changes. Can you tell me why
The blue lines are original data and orange is after baselineremoval. I used following code and data.
a_org = array([664300000, 686100000, 667900000, 655000000, 602000000, 546500000, 532600000, 496400000, 469000000, 430700000, 416500000, 423300000, 622900000, 662200000, 679200000, 662600000, 630800000, 581100000, 531100000, 509500000, 469600000, 445200000, 424700000, 398000000, 383100000, 629400000, 668200000, 663400000, 639100000, 620700000, 564600000, 514500000, 499500000, 472800000, 441100000, 428000000, 406700000, 412900000, 627900000, 652900000, 663100000, 633400000, 586400000, 557600000, 511200000, 470300000, 445900000, 415400000, 388200000, 370300000, 498300000, 625700000, 647600000, 645700000, 628100000, 579800000, 516100000, 490300000, 456800000, 424000000, 399200000, 378300000, 362000000, 561600000, 629000000, 636300000, 626100000, 604500000, 557800000, 507700000, 463800000, 449300000, 398700000, 378900000, 377200000, 364600000, 591000000, 633500000, 636800000, 619600000, 589100000, 540800000, 498100000, 460400000, 418400000, 395900000, 397500000, 388100000, 366000000, 589600000, 632200000, 620200000, 597000000, 568600000, 517600000, 496000000, 456800000, 436500000, 407300000, 380600000, 363100000, 357500000, 592500000, 620500000, 615700000, 591900000, 549500000, 516500000, 464200000, 440700000, 402500000, 388400000, 365000000, 359400000, 384100000, 586700000, 609700000, 605100000, 587500000, 549700000, 497300000, 455000000, 441800000, 418100000, 386900000, 373000000, 358000000, 424400000, 591300000, 604800000, 599000000, 569200000, 537600000, 491600000, 455200000, 422800000, 392900000, 367500000, 352400000, 332400000, 480300000, 584100000, 595600000, 583100000, 552000000, 510400000, 471100000, 424600000, 421500000, 392500000, 377900000, 360000000, 340900000, 513500000, 570700000, 581400000, 574500000, 543900000, 503300000, 449700000, 421300000, 405600000, 383900000, 357600000, 342800000, 335600000, 530100000, 582000000, 586400000, 570900000, 523600000, 482100000, 458100000, 415600000, 382800000, 367800000, 347600000, 358100000, 337100000, 529100000, 576200000, 582000000, 562600000, 527400000, 478600000, 436600000, 402700000, 394800000, 367600000, 357000000, 331700000, 355000000, 542700000, 566100000, 564400000, 543900000, 504200000, 470800000, 434600000, 415100000])
from BaselineRemoval import BaselineRemoval polynomial_degree=2 #only needed for Modpoly and IModPoly algorithm input_array = x_org baseObj=BaselineRemoval(input_array) Modpoly_output=baseObj.ModPoly(polynomial_degree) Imodpoly_output=baseObj.IModPoly(polynomial_degree) Zhangfit_output=baseObj.ZhangFit() print('Original input:',input_array) print('Modpoly base corrected values:',Modpoly_output) print('IModPoly base corrected values:',Imodpoly_output) print('ZhangFit base corrected values:',Zhangfit_output) plt.plot(x_org) plt.plot(Zhangfit_output) plt.plot(baseline_values) plt.plot(baseline_values1)
Advertisement
Answer
BaselineRemoval will analyse the data and attempt to remove an estimated baseline from the values. This will reduce the Y values. You can see that the orange lines have been reduced such that the lowest values on each cycle are around 0.