sig

command module
v0.0.0-...-39b93c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2020 License: MIT Imports: 7 Imported by: 0

README

Sig: a signal generation, analysis, and visualization facility.

The Unix command line is a data science notebook computing environment. Sig aspires to make it an even better one.

This project was inspired by Command-line Tools can be 235x Faster than your Hadoop Cluster, among other things.

An example

$ sig signal \
    -fn sin \
    -n 2000 | \
  sig scatter \
    -title "A Sine Wave" \
    -caption-position ne
           ⡠⠒⠂⠉⠉⠁⠒⠢⡀                                        
        ⢀⠔⠁         ⠑⢄   A Sine Wave                        
      ⢀⠂⠁             ⠁⢂                                    
     ⡠⠁                 ⠡⡀                 X: [0.00, 6.22]  
   ⢀⠂                     ⢂               Y: [-1.00, 1.00]  
  ⠠⠁                       ⠡                                
 ⠄⠁                         ⠁⠄                              
⠌                            ⠈⢄                            ⢀
                               ⠐⡀                         ⢀⠂
                                ⠐⡀                       ⡐  
                                 ⠈⠠                     ⠌   
                                   ⠑⡀                 ⡐⠈    
                                    ⠈⠠⡀             ⢀⠌      
                                      ⠈⠢⢀         ⡠⠊        
                                         ⠑⠤⠠⣀⣀⢀⠤⠔⠈          

Sub-commands

  • sig signal: Generate signals
  • sig noise: Generate noise
  • sig histo: Bucket data and count frequencies
  • sig pick: Pick columns, optionally adding index column
  • sig scatter: Print 2D scatterplot

Until I add more documentation here, you can get information on supported command line options by typing sig help or, for example, sig scatter --help.

Building

Sig is written in Golang. To build it, clone the repository and build it with go install. The sig executable will be placed in your $GOBIN directory.

Another example

$ sig noise \
    -seed 1 \
    -type normal \
    -n 100000 | \
  sig histo \
    -n 138 | \
  sig scatter \
    -width 60 \
    -caption-position nw \
    -title="A Histogram" \
    -title-position bottom \
    -as-bars
        
                          ⣀⡄⣧⣿⣶⡀                            
  X: [-4.08, 4.37]       ⢠⣿⣿⣿⣿⣿⣷⡄                           
  Y: [0.00, 2468.00]    ⢠⣿⣿⣿⣿⣿⣿⣿⣷⢠                          
                       ⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄                         
                      ⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿                         
                     ⢀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆                        
                     ⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣀                       
                    ⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇                      
                   ⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇                     
                  ⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀                    
                 ⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄                   
                ⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆                  
               ⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⡀                
            ⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿A Histogram⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀              
⣀⣀⣀⣀⣀⣀⣠⣀⣤⣤⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣤⣄⣄⣀⣀⣀⣀⣀⣀⣀⣀

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL