-
Notifications
You must be signed in to change notification settings - Fork 40
/
skspec.core.html
1379 lines (1201 loc) · 99 KB
/
skspec.core.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>core Package — scikit-spectra 0.3.1-2 documentation</title>
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
<link rel="stylesheet" href="../_static/bootswatch-3.2.0/united/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.3.1-2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="../_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="../_static/bootstrap-3.2.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="top" title="scikit-spectra 0.3.1-2 documentation" href="../index.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
<a href="https://github.com/hugadams/scikit-spectra"
class="visible-desktop hidden-xs"><img
id="gh-banner"
style="position: absolute; top: 50px; right: 0; border: 0;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
alt="Fork me on GitHub"></a>
<script>
// Adjust banner height.
$(function () {
var navHeight = $(".navbar .container").css("height");
$("#gh-banner").css("top", navHeight);
});
</script>
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
<a href="../index.html"><img src="../_static/logo.png" border="100" alt="sampledoc"/></a>
</div>
<a href="https://github.com/hugadams/scikit-spectra"
class="visible-desktop hidden-xs"><img
id="gh-banner"
style="position: absolute; top: 50px; right: 0; border: 0;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
alt="Fork me on GitHub"></a>
<script>
// Adjust banner height.
$(function () {
var navHeight = $(".navbar .container").css("height");
$("#gh-banner").css("top", navHeight);
});
</script>
<div id="navbar" class="navbar navbar-inverse navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
skspec</a>
<span class="navbar-text navbar-version pull-left"><b>0.3</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="../index.html">Jump to <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"><ul>
<li class="toctree-l1"><a class="reference internal" href="APIMAIN.html">API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="APIMAIN.html#primary-structures-spectrum-spectra-specstack">Primary Structures: Spectrum, Spectra, SpecStack</a></li>
<li class="toctree-l2"><a class="reference internal" href="APIMAIN.html#index-objects">Index Objects</a></li>
<li class="toctree-l2"><a class="reference internal" href="APIMAIN.html#builtin-datasets">Builtin Datasets</a></li>
<li class="toctree-l2"><a class="reference internal" href="APIMAIN.html#io">IO</a></li>
<li class="toctree-l2"><a class="reference internal" href="APIMAIN.html#plotting">Plotting</a></li>
<li class="toctree-l2"><a class="reference internal" href="APIMAIN.html#graphical-user-interface-gui">Graphical User Interface (GUI)</a></li>
<li class="toctree-l2"><a class="reference internal" href="APIMAIN.html#two-dimensional-correlation-spectroscopy">Two-Dimensional Correlation Spectroscopy</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../support.html#mailing-list">Mailing List</a></li>
<li class="toctree-l2"><a class="reference internal" href="../support.html#contribute">Contribute</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../tutorials.html">Tutorials</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../tutorials.html#videos">Videos</a></li>
<li class="toctree-l2"><a class="reference internal" href="../tutorials.html#minutes-to-scikit-spectra">10 Minutes to scikit-spectra</a></li>
<li class="toctree-l2"><a class="reference internal" href="../tutorials.html#ipython-notebooks">IPython Notebooks</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../install.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../install.html#dependencies">Dependencies</a></li>
<li class="toctree-l2"><a class="reference internal" href="../install.html#pip-install">Pip Install</a></li>
<li class="toctree-l2"><a class="reference internal" href="../install.html#installation-from-source">Installation from source</a></li>
<li class="toctree-l2"><a class="reference internal" href="../install.html#testing-installation">Testing Installation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../about.html">About</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../about.html#history-and-background">History and Background</a></li>
<li class="toctree-l2"><a class="reference internal" href="../about.html#related-scipy-libraries">Related Scipy Libraries</a></li>
<li class="toctree-l2"><a class="reference internal" href="../about.html#other-spectroscopy-libraries-tools-in-python">Other Spectroscopy Libraries/Tools in Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="../about.html#developers">Developers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../about.html#acknowledgements">Acknowledgements</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../auto_examples/index.html">Examples</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../auto_examples/index.html#general-examples">General examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_examples/index.html#longer-examples">Longer examples</a></li>
</ul>
</li>
</ul>
</ul>
</li>
<li class="dropdown">
<a role="button"
id="dLabelLocalToc"
data-toggle="dropdown"
data-target="#"
href="#">This Page <b class="caret"></b></a>
<ul class="dropdown-menu localtoc"
role="menu"
aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#">core Package</a><ul>
<li><a class="reference internal" href="#module-skspec.core.abcindex"><tt class="docutils literal"><span class="pre">abcindex</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.abcspectra"><tt class="docutils literal"><span class="pre">abcspectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.anyspectra"><tt class="docutils literal"><span class="pre">anyspectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.baseline"><tt class="docutils literal"><span class="pre">baseline</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.file_utils"><tt class="docutils literal"><span class="pre">file_utils</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.specindex"><tt class="docutils literal"><span class="pre">specindex</span></tt> Module</a></li>
<li><a class="reference internal" href="#specpanel-module"><tt class="docutils literal"><span class="pre">specpanel</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.specstack"><tt class="docutils literal"><span class="pre">specstack</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.spectra"><tt class="docutils literal"><span class="pre">spectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.tempspectra"><tt class="docutils literal"><span class="pre">tempspectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.timeindex"><tt class="docutils literal"><span class="pre">timeindex</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.timespectra"><tt class="docutils literal"><span class="pre">timespectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.utilities"><tt class="docutils literal"><span class="pre">utilities</span></tt> Module</a></li>
</ul>
</li>
</ul>
</ul>
</li>
</ul>
<form class="navbar-form navbar-right" action="../search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper"><ul>
<li><a class="reference internal" href="#">core Package</a><ul>
<li><a class="reference internal" href="#module-skspec.core.abcindex"><tt class="docutils literal"><span class="pre">abcindex</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.abcspectra"><tt class="docutils literal"><span class="pre">abcspectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.anyspectra"><tt class="docutils literal"><span class="pre">anyspectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.baseline"><tt class="docutils literal"><span class="pre">baseline</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.file_utils"><tt class="docutils literal"><span class="pre">file_utils</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.specindex"><tt class="docutils literal"><span class="pre">specindex</span></tt> Module</a></li>
<li><a class="reference internal" href="#specpanel-module"><tt class="docutils literal"><span class="pre">specpanel</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.specstack"><tt class="docutils literal"><span class="pre">specstack</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.spectra"><tt class="docutils literal"><span class="pre">spectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.tempspectra"><tt class="docutils literal"><span class="pre">tempspectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.timeindex"><tt class="docutils literal"><span class="pre">timeindex</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.timespectra"><tt class="docutils literal"><span class="pre">timespectra</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-skspec.core.utilities"><tt class="docutils literal"><span class="pre">utilities</span></tt> Module</a></li>
</ul>
</li>
</ul>
<form action="../search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="col-md-12">
<div class="section" id="core-package">
<h1>core Package<a class="headerlink" href="#core-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-skspec.core.abcindex">
<span id="abcindex-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">abcindex</span></tt> Module<a class="headerlink" href="#module-skspec.core.abcindex" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="skspec.core.abcindex.ConversionFloat64Index">
<em class="property">class </em><tt class="descclassname">skspec.core.abcindex.</tt><tt class="descname">ConversionFloat64Index</tt><a class="reference internal" href="../_modules/skspec/core/abcindex.html#ConversionFloat64Index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcindex.ConversionFloat64Index" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skspec.core.abcindex.ConversionIndex" title="skspec.core.abcindex.ConversionIndex"><tt class="xref py py-class docutils literal"><span class="pre">skspec.core.abcindex.ConversionIndex</span></tt></a>, <tt class="xref py py-class docutils literal"><span class="pre">pandas.core.index.Float64Index</span></tt></p>
<p>Float64 conversion index. Main difference is that Float64Index
has several properties like “is_all_dates” and “is_unique” that are
critical for slicing and other Dataframe operations. Therefore, we
want to retain all these for the Float64Index. By method res order (MRO),
they should not overwrite anything define don conversion index.</p>
<dl class="docutils">
<dt>More about MRO in python: <a class="reference external" href="http://mypythonnotes.wordpress.com/2008/11/01/">http://mypythonnotes.wordpress.com/2008/11/01/</a></dt>
<dd>python-multiple-inheritance-and-the-diamond-problem/</dd>
</dl>
</dd></dl>
<dl class="class">
<dt id="skspec.core.abcindex.ConversionIndex">
<em class="property">class </em><tt class="descclassname">skspec.core.abcindex.</tt><tt class="descname">ConversionIndex</tt><a class="reference internal" href="../_modules/skspec/core/abcindex.html#ConversionIndex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcindex.ConversionIndex" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">pandas.core.index.Index</span></tt></p>
<dl class="docutils">
<dt>Base class for skspec. To overwrite, requires:</dt>
<dd><ul class="first last simple">
<li>replace unitdict with a dictionary from units.py, eg SPECUNITS</li>
<li>overwrite convert(), which defines conversions on the unit types.</li>
</ul>
</dd>
</dl>
<p>Since we are subclassing a numpy array and not a basic python object,
we don’t write __init__(); rather, __new__ and __array_finalize__ are
employed (<a class="reference external" href="http://docs.scipy.org/doc/numpy/user/basics.subclassing.html">http://docs.scipy.org/doc/numpy/user/basics.subclassing.html</a>)</p>
<p>_forcetype will force any construction to this type. Even tho it inherits
from float64index, found that passing an Int64Index to SpecIndex() resulted
in integer indicies.</p>
<dl class="attribute">
<dt id="skspec.core.abcindex.ConversionIndex.addnullunit">
<tt class="descname">addnullunit</tt><em class="property"> = True</em><a class="headerlink" href="#skspec.core.abcindex.ConversionIndex.addnullunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.abcindex.ConversionIndex.convert">
<tt class="descname">convert</tt><big>(</big><em>outunit</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/abcindex.html#ConversionIndex.convert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcindex.ConversionIndex.convert" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert spectral values based on string outunit. First converts
the current unit to the canonical unit (eg, nanometers goes to meters)
then to the outunit (eg, meters to eV). This is done through the unit
methods, .to_canonical() and .from_canonical() where in the case of
spectral units, canonical refers to meters.</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.abcindex.ConversionIndex.unit">
<tt class="descname">unit</tt><a class="reference internal" href="../_modules/skspec/core/abcindex.html#ConversionIndex.unit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcindex.ConversionIndex.unit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.abcindex.ConversionIndex.unitdict">
<tt class="descname">unitdict</tt><em class="property"> = None</em><a class="headerlink" href="#skspec.core.abcindex.ConversionIndex.unitdict" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.abcindex.ConversionIndex.unitshortdict">
<tt class="descname">unitshortdict</tt><a class="reference internal" href="../_modules/skspec/core/abcindex.html#ConversionIndex.unitshortdict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcindex.ConversionIndex.unitshortdict" title="Permalink to this definition">¶</a></dt>
<dd><p>Return key:shortname; used by TimeSpectra to list output units.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="skspec.core.abcindex.CustomIndex">
<em class="property">class </em><tt class="descclassname">skspec.core.abcindex.</tt><tt class="descname">CustomIndex</tt><a class="reference internal" href="../_modules/skspec/core/abcindex.html#CustomIndex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcindex.CustomIndex" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">pandas.core.index.Float64Index</span></tt></p>
<p>Custom index used in skspec to interface to Unit.</p>
<dl class="method">
<dt id="skspec.core.abcindex.CustomIndex.convert">
<tt class="descname">convert</tt><big>(</big><em>outunit</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/abcindex.html#CustomIndex.convert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcindex.CustomIndex.convert" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.abcindex.CustomIndex.unit">
<tt class="descname">unit</tt><a class="reference internal" href="../_modules/skspec/core/abcindex.html#CustomIndex.unit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcindex.CustomIndex.unit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-skspec.core.abcspectra">
<span id="abcspectra-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">abcspectra</span></tt> Module<a class="headerlink" href="#module-skspec.core.abcspectra" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="skspec.core.abcspectra.ABCSpectra">
<em class="property">class </em><tt class="descclassname">skspec.core.abcspectra.</tt><tt class="descname">ABCSpectra</tt><a class="reference internal" href="../_modules/skspec/core/abcspectra.html#ABCSpectra"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcspectra.ABCSpectra" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
<p>Generic methods shared by all skspec spectra objects. INCLUDING
SPECTRUM.
For example,
printing out html orientation, and defining the “nearby” slicer. The goal
is to separate out methods that are intended to be customized, but might
be buried on the already heavy Spectra object.</p>
<dl class="attribute">
<dt id="skspec.core.abcspectra.ABCSpectra.full_iunit">
<tt class="descname">full_iunit</tt><a class="reference internal" href="../_modules/skspec/core/abcspectra.html#ABCSpectra.full_iunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcspectra.ABCSpectra.full_iunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.abcspectra.ABCSpectra.full_name">
<tt class="descname">full_name</tt><a class="reference internal" href="../_modules/skspec/core/abcspectra.html#ABCSpectra.full_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcspectra.ABCSpectra.full_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Timespectra:name or Timespectra:unnamed. Useful for scripts mostly</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.abcspectra.ABCSpectra.iunit">
<tt class="descname">iunit</tt><a class="reference internal" href="../_modules/skspec/core/abcspectra.html#ABCSpectra.iunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcspectra.ABCSpectra.iunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.abcspectra.ABCSpectra.nearby">
<tt class="descname">nearby</tt><a class="reference internal" href="../_modules/skspec/core/abcspectra.html#ABCSpectra.nearby"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcspectra.ABCSpectra.nearby" title="Permalink to this definition">¶</a></dt>
<dd><p>Slicers similiar to loc that allows for nearby value slicing.
It also would be posslbe to define operations on this through bool
logic like df[(x<50) & (X>50), but that requires creating a new
indexer]</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="skspec.core.abcspectra.SpecError">
<em class="property">exception </em><tt class="descclassname">skspec.core.abcspectra.</tt><tt class="descname">SpecError</tt><a class="reference internal" href="../_modules/skspec/core/abcspectra.html#SpecError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcspectra.SpecError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/exceptions.html#exceptions.Exception" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></a></p>
</dd></dl>
<dl class="exception">
<dt id="skspec.core.abcspectra.SpecIndexError">
<em class="property">exception </em><tt class="descclassname">skspec.core.abcspectra.</tt><tt class="descname">SpecIndexError</tt><a class="reference internal" href="../_modules/skspec/core/abcspectra.html#SpecIndexError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.abcspectra.SpecIndexError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skspec.core.abcspectra.SpecError" title="skspec.core.abcspectra.SpecError"><tt class="xref py py-class docutils literal"><span class="pre">skspec.core.abcspectra.SpecError</span></tt></a></p>
<p>For indexing operations in particular.</p>
</dd></dl>
</div>
<div class="section" id="module-skspec.core.anyspectra">
<span id="anyspectra-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">anyspectra</span></tt> Module<a class="headerlink" href="#module-skspec.core.anyspectra" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="skspec.core.anyspectra.AnyFrame">
<em class="property">class </em><tt class="descclassname">skspec.core.anyspectra.</tt><tt class="descname">AnyFrame</tt><big>(</big><em>*dfargs</em>, <em>**dfkwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/anyspectra.html#AnyFrame"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.anyspectra.AnyFrame" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skspec.core.spectra.Spectra" title="skspec.core.spectra.Spectra"><tt class="xref py py-class docutils literal"><span class="pre">skspec.core.spectra.Spectra</span></tt></a></p>
<p>Spectra with default non-strict columns or index</p>
</dd></dl>
</div>
<div class="section" id="module-skspec.core.baseline">
<span id="baseline-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">baseline</span></tt> Module<a class="headerlink" href="#module-skspec.core.baseline" title="Permalink to this headline">¶</a></h2>
<p>Various dataframe-compatible reference utilities.</p>
<dl class="function">
<dt id="skspec.core.baseline.dynamic_baseline">
<tt class="descclassname">skspec.core.baseline.</tt><tt class="descname">dynamic_baseline</tt><big>(</big><em>df</em>, <em>slices</em>, <em>style='linear'</em>, <em>weightstyle=None</em>, <em>axis=1</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/baseline.html#dynamic_baseline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.baseline.dynamic_baseline" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies a dynamically calculated reference correction to a dataframe. User passes in index values, either ranges
or points, then a linear fit is applied through these points. Each column in the dataframe is scaled its corresponding
curve, which is then subracted off. Essentially, this subracts a reference that can be lopsided- useful for assymetric data, and
is usually how crude ATR-IR reference correction is performed.</p>
<p>For now, program only works for index values as the reference.</p>
<p>df- DataFrame.</p>
<dl class="docutils">
<dt>slice- List of points or ranges at which the reference data is sampled. For example, </dt>
<dd>( (300.0, 500.0), 900.0 ). Curve will take all index values of the dataframe between
300.0:500.0 (nanometers in my case), and also take the closest index value there is to 900.0.
A fit is then drawn between these points.</dd>
<dt>style- Fitting style to connect the dots between slice regions. For now, only linear fit is used. Not sure if higher order</dt>
<dd>will ever be useful, so I left this in here as a reminder.</dd>
</dl>
<p>axis- Axis overwhich to do this reference correction. For now, ONLY INDEX IS IMPLEMENTED.</p>
<dl class="docutils">
<dt>weightstyle- Tries to account for idea that if I pass slices, and one slice contains more points, then the line of best fit will be weighted</dt>
<dd>more strongly to this region. For now, I haven’t implemented this, but would have to actually use poly1d to call more points to the
other regions, or some other solution? This does have an option, mean, which will take the mean if each range so that each range gets
a single fit point; however, I think this is useless as this can be passed in anyway. And it’s the mean of the x-values, not even the
mean of the data along that axis anyway.</dd>
<dt>returns-</dt>
<dd>DataFrame of fitted references.</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-skspec.core.file_utils">
<span id="file-utils-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">file_utils</span></tt> Module<a class="headerlink" href="#module-skspec.core.file_utils" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="skspec.core.file_utils.get_files_in_dir">
<tt class="descclassname">skspec.core.file_utils.</tt><tt class="descname">get_files_in_dir</tt><big>(</big><em>directory</em>, <em>sort=True</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/file_utils.html#get_files_in_dir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.file_utils.get_files_in_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a directory, returns just the files; ignores directories</p>
</dd></dl>
<dl class="function">
<dt id="skspec.core.file_utils.get_shortname">
<tt class="descclassname">skspec.core.file_utils.</tt><tt class="descname">get_shortname</tt><big>(</big><em>filepath</em>, <em>cut_extension=False</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/file_utils.html#get_shortname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.file_utils.get_shortname" title="Permalink to this definition">¶</a></dt>
<dd><p>simply get the filename of fullpath. Cut extension will remove file extension</p>
</dd></dl>
<dl class="function">
<dt id="skspec.core.file_utils.make_root_dir">
<tt class="descclassname">skspec.core.file_utils.</tt><tt class="descname">make_root_dir</tt><big>(</big><em>rootout</em>, <em>overwrite=False</em>, <em>verbose=True</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/file_utils.html#make_root_dir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.file_utils.make_root_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates directory structure for program results output. Warning, if overwriting, all files and subfolders
in the root out directory will be destroyed, not just ones pertaining to the relevant infiles.</p>
</dd></dl>
<dl class="function">
<dt id="skspec.core.file_utils.out_getter">
<tt class="descclassname">skspec.core.file_utils.</tt><tt class="descname">out_getter</tt><big>(</big><em>imjobject</em>, <em>with_header=True</em>, <em>delim='\t'</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/file_utils.html#out_getter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.file_utils.out_getter" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a special getter which takes in attribute fields as well as corresponding mapping functions
to format return in a sexy way. Couldn’t quite rig it up properly so this is not in use!</p>
</dd></dl>
<dl class="function">
<dt id="skspec.core.file_utils.sort_summary">
<tt class="descclassname">skspec.core.file_utils.</tt><tt class="descname">sort_summary</tt><big>(</big><em>summary_file</em>, <em>delim='\t'</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/file_utils.html#sort_summary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.file_utils.sort_summary" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-skspec.core.specindex">
<span id="specindex-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">specindex</span></tt> Module<a class="headerlink" href="#module-skspec.core.specindex" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="skspec.core.specindex.SpecIndex">
<em class="property">class </em><tt class="descclassname">skspec.core.specindex.</tt><tt class="descname">SpecIndex</tt><a class="reference internal" href="../_modules/skspec/core/specindex.html#SpecIndex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specindex.SpecIndex" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skspec.core.abcindex.ConversionFloat64Index" title="skspec.core.abcindex.ConversionFloat64Index"><tt class="xref py py-class docutils literal"><span class="pre">skspec.core.abcindex.ConversionFloat64Index</span></tt></a></p>
<dl class="attribute">
<dt id="skspec.core.specindex.SpecIndex.unitdict">
<tt class="descname">unitdict</tt><em class="property"> = {'um-1': <skspec.units.specunits.Micrometersinverse object at 0x6561b50>, 'nm': <skspec.units.specunits.Nanometers object at 0x6561a50>, 'cm': <skspec.units.specunits.Centimeters object at 0x6561a90>, 'f': <skspec.units.specunits.Frequency object at 0x6561bd0>, 'k': <skspec.units.specunits.Metersinverse object at 0x6561a10>, 'm': <skspec.units.specunits.Meters object at 0x65619d0>, 'um': <skspec.units.specunits.Micrometers object at 0x6561b10>, 'w': <skspec.units.specunits.Angularfrequency object at 0x6561c10>, 'cm-1': <skspec.units.specunits.Centimetersinverse object at 0x6561ad0>, 'ev': <skspec.units.specunits.Electronvolts object at 0x6561b90>}</em><a class="headerlink" href="#skspec.core.specindex.SpecIndex.unitdict" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="specpanel-module">
<h2><tt class="xref py py-mod docutils literal"><span class="pre">specpanel</span></tt> Module<a class="headerlink" href="#specpanel-module" title="Permalink to this headline">¶</a></h2>
<span class="target" id="module-skspec.core.specpanel"></span><p>Interface to make a panel-type object for storing timespectra. Allows for
axis aliases like “spectral” and “temporal” slicers.</p>
<dl class="class">
<dt id="skspec.core.specpanel.SpecPanel">
<em class="property">class </em><tt class="descclassname">skspec.core.specpanel.</tt><tt class="descname">SpecPanel</tt><big>(</big><em>data=None</em>, <em>items=None</em>, <em>spectral=None</em>, <em>temporal=None</em>, <em>copy=False</em>, <em>dtype=None</em>, <em>name=None</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specpanel.html#SpecPanel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specpanel.SpecPanel" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">pandas.core.panel.Panel</span></tt></p>
</dd></dl>
</div>
<div class="section" id="module-skspec.core.specstack">
<span id="specstack-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">specstack</span></tt> Module<a class="headerlink" href="#module-skspec.core.specstack" title="Permalink to this headline">¶</a></h2>
<p>Storage class for sets of pandas object. Similar to a panel,
but does inherently store 3d data. Data can be converted to 3d through
methods, but otherwise is just a container.</p>
<dl class="exception">
<dt id="skspec.core.specstack.MultiError">
<em class="property">exception </em><tt class="descclassname">skspec.core.specstack.</tt><tt class="descname">MultiError</tt><a class="reference internal" href="../_modules/skspec/core/specstack.html#MultiError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.MultiError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/exceptions.html#exceptions.Exception" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></a></p>
</dd></dl>
<dl class="class">
<dt id="skspec.core.specstack.SpecStack">
<em class="property">class </em><tt class="descclassname">skspec.core.specstack.</tt><tt class="descname">SpecStack</tt><big>(</big><em>data</em>, <em>keys=None</em>, <em>name=''</em>, <em>sort_items=False</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specstack.html#SpecStack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.SpecStack" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skspec.core.specstack.Stack" title="skspec.core.specstack.Stack"><tt class="xref py py-class docutils literal"><span class="pre">skspec.core.specstack.Stack</span></tt></a></p>
<p>Stack for just storing timespectra objects.</p>
<dl class="method">
<dt id="skspec.core.specstack.SpecStack.apply">
<tt class="descname">apply</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#skspec.core.specstack.SpecStack.apply" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.specstack.SpecStack.as_3d">
<tt class="descname">as_3d</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specstack.html#SpecStack.as_3d"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.SpecStack.as_3d" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.specstack.SpecStack.get_all">
<tt class="descname">get_all</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#skspec.core.specstack.SpecStack.get_all" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.specstack.SpecStack.itemlabel">
<tt class="descname">itemlabel</tt><em class="property"> = 'spec_'</em><a class="headerlink" href="#skspec.core.specstack.SpecStack.itemlabel" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.specstack.SpecStack.iunit">
<tt class="descname">iunit</tt><a class="reference internal" href="../_modules/skspec/core/specstack.html#SpecStack.iunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.SpecStack.iunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.specstack.SpecStack.plot">
<tt class="descname">plot</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specstack.html#SpecStack.plot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.SpecStack.plot" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.specstack.SpecStack.reference">
<tt class="descname">reference</tt><a class="reference internal" href="../_modules/skspec/core/specstack.html#SpecStack.reference"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.SpecStack.reference" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.specstack.SpecStack.set_all">
<tt class="descname">set_all</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#skspec.core.specstack.SpecStack.set_all" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.specstack.SpecStack.specunit">
<tt class="descname">specunit</tt><a class="reference internal" href="../_modules/skspec/core/specstack.html#SpecStack.specunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.SpecStack.specunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.specstack.SpecStack.varunit">
<tt class="descname">varunit</tt><a class="reference internal" href="../_modules/skspec/core/specstack.html#SpecStack.varunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.SpecStack.varunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="skspec.core.specstack.Stack">
<em class="property">class </em><tt class="descclassname">skspec.core.specstack.</tt><tt class="descname">Stack</tt><big>(</big><em>data</em>, <em>keys=None</em>, <em>name=''</em>, <em>sort_items=False</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specstack.html#Stack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.Stack" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
<p>Base class to store pandas objects, with special operations to
return as 3d data (eg panel) and to apply functions itemwise. Items are
stored in an ordered dict.</p>
<dl class="method">
<dt id="skspec.core.specstack.Stack.apply">
<tt class="descname">apply</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specstack.html#Stack.apply"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.Stack.apply" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.specstack.Stack.as_3d">
<tt class="descname">as_3d</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specstack.html#Stack.as_3d"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.Stack.as_3d" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.specstack.Stack.full_name">
<tt class="descname">full_name</tt><a class="reference internal" href="../_modules/skspec/core/specstack.html#Stack.full_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.Stack.full_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Timespectra:name or Timespectra:unnamed. Useful for scripts mostly</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.specstack.Stack.get_all">
<tt class="descname">get_all</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specstack.html#Stack.get_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.Stack.get_all" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.specstack.Stack.itemlabel">
<tt class="descname">itemlabel</tt><em class="property"> = 'Item'</em><a class="headerlink" href="#skspec.core.specstack.Stack.itemlabel" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.specstack.Stack.set_all">
<tt class="descname">set_all</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specstack.html#Stack.set_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.Stack.set_all" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="skspec.core.specstack.mem_address">
<tt class="descclassname">skspec.core.specstack.</tt><tt class="descname">mem_address</tt><big>(</big><em>obj</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/specstack.html#mem_address"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.specstack.mem_address" title="Permalink to this definition">¶</a></dt>
<dd><p>Return memory address string for a python object. Object must have
default python object __repr__ (ie it would look something like:</p>
<blockquote>
<div><pyparty.tools.grids.CartesianGrid object at 0x3ba2fb0></div></blockquote>
<p>The address is merely returned by string parsing.</p>
</dd></dl>
</div>
<div class="section" id="module-skspec.core.spectra">
<span id="spectra-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">spectra</span></tt> Module<a class="headerlink" href="#module-skspec.core.spectra" title="Permalink to this headline">¶</a></h2>
<p>Provides core “Spectra” class and associated utilities.</p>
<dl class="class">
<dt id="skspec.core.spectra.Spectra">
<em class="property">class </em><tt class="descclassname">skspec.core.spectra.</tt><tt class="descname">Spectra</tt><big>(</big><em>*dfargs</em>, <em>**dfkwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skspec.core.abcspectra.ABCSpectra" title="skspec.core.abcspectra.ABCSpectra"><tt class="xref py py-class docutils literal"><span class="pre">skspec.core.abcspectra.ABCSpectra</span></tt></a>, <a class="reference internal" href="skspec.pandas_utils.html#skspec.pandas_utils.metadframe.MetaDataFrame" title="skspec.pandas_utils.metadframe.MetaDataFrame"><tt class="xref py py-class docutils literal"><span class="pre">skspec.pandas_utils.metadframe.MetaDataFrame</span></tt></a></p>
<p>Provides core Spectra composite pandas DataFrame to represent a set
of spectral data. Enforces spectral data along the index and temporal
data as columns. The spectral index is controlled from the specindex module,
which has a psuedo-class called SpecIndex (really a monkey patched Index).
Temporal data is stored using a DatetimeIndex or a modified interval
reprentation. The need to support two types of temporal index, one of
which is Pandas builtin DatetimeIndex is what led me to not create a
special index object (like SpecIndex). Other spectral axis types (like
Temperature axis) should probably be built close to the manner of Spec index.
The Spectra dataframe actually stores enough temporal metadatato go back
and forth between DatetimeIndex and Interval representations.
It does this by generating one or the other on the fly, and never relies on
the current label object to generate teh next object.</p>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.add_base">
<tt class="descname">add_base</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.add_base"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.add_base" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds baseline to data that currently has it subtracted.</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.apply">
<tt class="descname">apply</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.apply"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.apply" title="Permalink to this definition">¶</a></dt>
<dd><p>Raw=True seems to produce correct results more often from some
#deep issue that is not fully tracked.</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.area">
<tt class="descname">area</tt><big>(</big><em>apply_fcn='simps'</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.area"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.area" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns total area under the spectra vs. time curve. To choose a slice of the spectrum,</dt>
<dd>call wavelength_slices with appropriate ranges and an apply_fcn appropriate to style of integration.</dd>
</dl>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>apply_fcn: Integration method-‘simps’, ‘trapz’, ‘romb’, ‘cumtrapz’</strong> :</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<p>This is a wrapper for wavelength_sclices, and as such, user can actually pass any function into the apply_fcn.
Besides mean/sum which is understands already, one could, for example, pass a euler integration function and
it should work.</p>
<p>WHEN PLOTTING, PLOT THE TRANSPOSE OF THE RETURNED DF.</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.as_norm">
<tt class="descname">as_norm</tt><big>(</big><em>unit</em>, <em>reference=None</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.as_norm"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.as_norm" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns new Spectra of modified norm. Useful if in-place operation not desirable.
Also has the option of manually passing a new reference for on-the-fly rereferencing.</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.as_specunit">
<tt class="descname">as_specunit</tt><big>(</big><em>unit</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.as_specunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.as_specunit" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns new dataframe with different spectral unit on the index.</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.as_varunit">
<tt class="descname">as_varunit</tt><big>(</big><em>unit</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.as_varunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.as_varunit" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns new dataframe with different spectral unit on the index.</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.base_sub">
<tt class="descname">base_sub</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.base_sub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.base_sub" title="Permalink to this definition">¶</a></dt>
<dd><p>Is baseline currently subtracted from spectral data.</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.baseline">
<tt class="descname">baseline</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.baseline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.baseline" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.boxcar">
<tt class="descname">boxcar</tt><big>(</big><em>binwidth</em>, <em>axis=1</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.boxcar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.boxcar" title="Permalink to this definition">¶</a></dt>
<dd><p>Performs pvutils.boxcar averaging by binning data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>binwidth: int or float</strong> :</p>
<blockquote>
<div><p>Width of the bin. EG 10minutes or 5 seconds.</p>
</div></blockquote>
<p><strong>axis: 0 or 1</strong> :</p>
<blockquote class="last">
<div><p>Average over rows or columns, respectively.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.cnsvdattr">
<tt class="descname">cnsvdattr</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.cnsvdattr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.cnsvdattr" title="Permalink to this definition">¶</a></dt>
<dd><p>attr:value of conserved attributes</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.cnsvdmeth">
<tt class="descname">cnsvdmeth</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.cnsvdmeth"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.cnsvdmeth" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.columns">
<tt class="descname">columns</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.columns"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.columns" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="classmethod">
<dt id="skspec.core.spectra.Spectra.from_csv">
<em class="property">classmethod </em><tt class="descname">from_csv</tt><big>(</big><em>filepath_or_buffer</em>, <em>header_datetime=False</em>, <em>index_datetime=False</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.from_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.from_csv" title="Permalink to this definition">¶</a></dt>
<dd><p>Read from CSV file. Wrapping pandas read_csv:
<a class="reference external" href="http://pandas.pydata.org/pandas-docs/version/0.13.1/">http://pandas.pydata.org/pandas-docs/version/0.13.1/</a> generated/pandas.io.parsers.read_csv.html</p>
<p>filepath_or_buffer: (from pandas API) string or file handle / StringIO.
The string could be a URL. Valid URL schemes include http, ftp, s3,
and file. For file URLs, a host is expected. For instance, a local
file could be file.</p>
<dl class="docutils">
<dt>header_datetime: bool or format str (False)</dt>
<dd>Used to parse files with header that is a datetime string.
User must pass a format string e.g. %Y/%m/%d %H:%M:%S, which
is the default. Results in DatetimeIndex as label. This will
set the varunit to ‘dti’ automatically, unless specifically
set as None.</dd>
<dt>index_datetime: bool or format str (False)</dt>
<dd>Used to parse files with header that is a datetime string.
User must pass a format string e.g. %Y/%m/%d %H:%M:%S, which
is the default. Results in DatetimeIndex as label. This will
set the specunit to ‘dti’ automatically, unles specifically set
as None.</dd>
</dl>
<p><a href="#id1"><span class="problematic" id="id2">**</span></a>kwargs: Any valid spectra or pandas readcsv() kwargs.</p>
<p>Returns: Spectra</p>
</dd></dl>
<dl class="classmethod">
<dt id="skspec.core.spectra.Spectra.from_series">
<em class="property">classmethod </em><tt class="descname">from_series</tt><big>(</big><em>pandas_object</em>, <em>**dfkwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.from_series"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.from_series" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a Spectra from a similiar object, either a pandas DataFrame
or a skspec Spectra subclass. Useful for type-casting, for example
have a DataFrame and want it as a TimeSpectra, which will do its
own index conversions.</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.full_norm">
<tt class="descname">full_norm</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.full_norm"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.full_norm" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.full_specunit">
<tt class="descname">full_specunit</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.full_specunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.full_specunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.full_varunit">
<tt class="descname">full_varunit</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.full_varunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.full_varunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.index">
<tt class="descname">index</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.index"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.index" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.list_attr">
<tt class="descname">list_attr</tt><big>(</big><em>privattr=False</em>, <em>dfattr=False</em>, <em>methods=False</em>, <em>types=False</em>, <em>delim='\t'</em>, <em>sortby='name'</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.list_attr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.list_attr" title="Permalink to this definition">¶</a></dt>
<dd><p>Outputs various attributes in the namespace, as well as their types.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>privattr: Should private attributes be listed.</strong> :</p>
<blockquote class="last">
<div><p>dfattr: Should dataframe’s attributes (eg shape, columns) be listed
methods: If True, methods will be output; otherwise, only non-method attributes are listed.
types: Output the type of attribute along with it?
delim: For formatting.
sortby: If outputing by type, order by name or by type?</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p>.</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.norm">
<tt class="descname">norm</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.norm"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.norm" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.norms">
<tt class="descname">norms</tt><big>(</big><em>delim='\t'</em>, <em>pprint=False</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.norms"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.norms" title="Permalink to this definition">¶</a></dt>
<dd><p>Intensity units of dateframe. Eg %Transmittance vs. Absorbance</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.plot">
<tt class="descname">plot</tt><big>(</big><em>*args</em>, <em>**pltkwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.plot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.plot" title="Permalink to this definition">¶</a></dt>
<dd><p>Plotting interface. Use kind=’surf, wire etc...’ to go through
various plot types. Will append correct x and y labels.</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.plot_kinds">
<tt class="descname">plot_kinds</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.plot_kinds"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.plot_kinds" title="Permalink to this definition">¶</a></dt>
<dd><p>List available plot kinds</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.reference">
<tt class="descname">reference</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.reference"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.reference" title="Permalink to this definition">¶</a></dt>
<dd><p>This is stored as a Series unless user has set it otherwise.</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.set_specindex">
<tt class="descname">set_specindex</tt><big>(</big><em>start=None</em>, <em>stop=None</em>, <em>spacing=None</em>, <em>unit=None</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.set_specindex"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.set_specindex" title="Permalink to this definition">¶</a></dt>
<dd><p>Helper method to generate a spectral index. Works similarly to
pandas.daterange(). Takes in start, stop and spacing. Users can use
either start and stop, start and spacing or stop and spacing (but not
start, stop and spacing) to generate specindex.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>start: Wavelength start value.</strong> :</p>
<p><strong>stop: Wavelength stop value.</strong> :</p>
<p><strong>spacing: Wavelength spacing.</strong> :</p>
<p><strong>unit: Valid specunit type. Note, if None is passed, current specunit of</strong> :</p>
<blockquote class="last">
<div><p>object is used. To force a null unit, use special keyword ‘null’.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<p>User must pass 2 of the 3 keywords start, stop or spacing. Function
will compute the other using the length of the current dfindex.
For example, if df.index is 100 entries and user enters start=0, stop=1000,
then spacing is set to ten to retain 100 entries.
If user enters start and spacing, then stop is determined to retain 100
entries.
User can also enter stop and spacing, and start is inferred by counting
backwards from stop at steps equal to spacing size.</p>
<p>To generate less restricted SpecIndex from start, stop AND spacing, try
set_sindex() function in specindex.py module.</p>
<p>Under the hood this calls set_sindex() which is a wrapper to
np.linspace().</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.specunit">
<tt class="descname">specunit</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.specunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.specunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.specunits">
<tt class="descname">specunits</tt><big>(</big><em>delim='\t'</em>, <em>pprint=False</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.specunits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.specunits" title="Permalink to this definition">¶</a></dt>
<dd><p>Print out all available units in a nice format</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.split_by">
<tt class="descname">split_by</tt><big>(</big><em>n</em>, <em>axis=1</em>, <em>stack=True</em>, <em>**stackkwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.split_by"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.split_by" title="Permalink to this definition">¶</a></dt>
<dd><p>Slice data into n subsets.</p>
<p class="rubric">Notes</p>
<p>If n does not evenly divide the axis, the final element returned tends
to be larger than the others (culmination of rounding down iteratively)
and a warning is raised.</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.sub_base">
<tt class="descname">sub_base</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.sub_base"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.sub_base" title="Permalink to this definition">¶</a></dt>
<dd><p>Subtracts baseline from entire dataset.</p>
<blockquote>
<div>Does have to call self._frame. Just doing self.sub will not work, even though
calling ts.sub() from an outside program does in fact work. Behavior is due
to way in which python classes deal with overwrites of self.</div></blockquote>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.to_R_df">
<tt class="descname">to_R_df</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.to_R_df"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.to_R_df" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps pandas.rpy.common import convert_to_r_dataframe.</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.to_csv">
<tt class="descname">to_csv</tt><big>(</big><em>path_or_buff</em>, <em>meta_separate=None</em>, <em>**csv_kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.to_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.to_csv" title="Permalink to this definition">¶</a></dt>
<dd><p>Output to CSV file.</p>
<blockquote>
<div><p>path_or_buff: string path to outfile destination.</p>
<dl class="docutils">
<dt>meta_separate: </dt>
<dd>If None: metadata is lost and self._frame.to_csv(<a href="#id3"><span class="problematic" id="id4">**</span></a>csv_kwargs) is called.
If False: metadata is serialized and output at tail file the path_or_buff file.
If True: metadata is added to it’s own file named path_or_buff.mdf</dd>
</dl>
<p>csv_kwargs: csv formatting arguments passed directoy to self._frame.to_csv()</p>
</div></blockquote>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectra.varunit">
<tt class="descname">varunit</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.varunit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.varunit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.varunits">
<tt class="descname">varunits</tt><big>(</big><em>delim='\t'</em>, <em>pprint=False</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.varunits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.varunits" title="Permalink to this definition">¶</a></dt>
<dd><p>Print out all available variable units in a nice format</p>
</dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectra.wavelength_slices">
<tt class="descname">wavelength_slices</tt><big>(</big><em>ranges</em>, <em>apply_fcn='mean'</em>, <em>**applyfcn_kwds</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectra.wavelength_slices"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectra.wavelength_slices" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns sliced averages/sums of wavelength regions. Composite dataframe will nicely
plot when piped into spec aesthetics timeplot.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="skspec.core.spectra.Spectrum">
<em class="property">class </em><tt class="descclassname">skspec.core.spectra.</tt><tt class="descname">Spectrum</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectrum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectrum" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#skspec.core.abcspectra.ABCSpectra" title="skspec.core.abcspectra.ABCSpectra"><tt class="xref py py-class docutils literal"><span class="pre">skspec.core.abcspectra.ABCSpectra</span></tt></a>, <a class="reference internal" href="skspec.pandas_utils.html#skspec.pandas_utils.metadframe.MetaSeries" title="skspec.pandas_utils.metadframe.MetaSeries"><tt class="xref py py-class docutils literal"><span class="pre">skspec.pandas_utils.metadframe.MetaSeries</span></tt></a></p>
<p>Compliment to pandas Series: single array of spectral values with
spectral Index.</p>
<dl class="classmethod">
<dt id="skspec.core.spectra.Spectrum.from_series">
<em class="property">classmethod </em><tt class="descname">from_series</tt><big>(</big><em>spectra</em>, <em>series</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectrum.from_series"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectrum.from_series" title="Permalink to this definition">¶</a></dt>
<dd><p>When Spectra methods need to return a Spectrum, this is called
so that metadata is properly transferred.</p>
</dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectrum.full_unit">
<tt class="descname">full_unit</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectrum.full_unit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectrum.full_unit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="skspec.core.spectra.Spectrum.plot">
<tt class="descname">plot</tt><big>(</big><em>*args</em>, <em>**pltkwds</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectrum.plot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectrum.plot" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="skspec.core.spectra.Spectrum.unit">
<tt class="descname">unit</tt><a class="reference internal" href="../_modules/skspec/core/spectra.html#Spectrum.unit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.Spectrum.unit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="skspec.core.spectra.spec_from_dir">
<tt class="descclassname">skspec.core.spectra.</tt><tt class="descname">spec_from_dir</tt><big>(</big><em>directory</em>, <em>csvargs</em>, <em>sortnames=False</em>, <em>concat_axis=1</em>, <em>shortname=True</em>, <em>cut_extension=False</em><big>)</big><a class="reference internal" href="../_modules/skspec/core/spectra.html#spec_from_dir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skspec.core.spectra.spec_from_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>Takes files from a directory, presuming they are identically formatted, and reads them into
a dataframe by iterating over read_csv(). All arguments that read_csv() would take are passed
in. These kwargs are in regard the files themselves, for example, skiprows, skipfooter and header.</p>
<p>For now, no support for glob to take only files of a certain file extension.
For now, conctaentation occurs along</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">directory- Path to directory where files are stored.
csvargs- Dictionary of arguments that are passed directly to the read_csv() function. For example</p>
<blockquote class="last">
<div>skiprows, header, na_values etc... see pandas API for read_csv()</div></blockquote>
</dd>
<dt>Kwds:</dt>
<dd><dl class="first docutils">
<dt>sortnames- Will attempt to autosort the filelist. Otherwise, files are ordered by the module</dt>
<dd>os.path.listdir().</dd>
<dt>concat_axis- How to merge datafiles into a dataframe. Default is axis=1, which means all files </dt>
<dd>should share the same index values. I use this for spectral data where the wavelength
column is my dataframe index.</dd>
</dl>
<p>shortname- If false, full file path is used as the column name. If true, only the filename is used.</p>
<p class="last">cut_extension- If kwd shortname is True, this will determine if the file extension is saved or cut from the data.</p>
</dd>
</dl>
</dd></dl>