version: 1

# instrument the data belongs to; `xsh` or `soxs`
instrument: soxs

# soxs-mbias:
#     clipping-lower-sigma: 5
#     clipping-upper-sigma: 5   
#     clipping-iteration-count: 5

# soxs-mdark:
#     clipping-lower-sigma: 5
#     clipping-upper-sigma: 5   
#     clipping-iteration-count: 5

# soxs-disp-solution:
#     pixel-window-size: 10
#     order-deg: 3
#     wavelength-deg: 3
#     poly-clipping-iteration-limit: 10
#     poly-fitting-residual-clipping-sigma: 5

# soxs-order-centre:
#     order-sample-count: 50
#     slice-length: 10
#     peak-sigma-limit: 3
#     poly-deg: 5
#     poly-fitting-residual-clipping-sigma: 1.5
#     poly-clipping-iteration-limit: 5

# soxs-spatial-solution:
#     pixel-window-size: 10
#     order-deg: 3
#     wavelength-deg: 3
#     slit-deg: 3
#     poly-clipping-iteration-limit: 10
#     poly-fitting-residual-clipping-sigma: 5

# soxs-mflat:
#     centre-order-window: 20
#     clipping-lower-sigma: 50
#     clipping-upper-sigma: 50   
#     clipping-iteration-count: 5
#     slice-length-for-edge-detection: 90
#     slice-width-for-edge-detection: 5
#     min-percentage-threshold-for-edge-detection: 20
#     max-percentage-threshold-for-edge-detection: 50
#     poly-deg: 4
#     poly-fitting-residual-clipping-sigma: 5
#     poly-clipping-iteration-limit: 10
#     low-sensitivity-clipping-simga: 2
    

# soxs-straighten:
#     asdasd: 1

# # UTILS
# background-subtraction:
#     bspline-deg: 3
#     median-filter-pixels: 11

# test-data-root: ~/xshooter-pipeline-data/unittest_data
intermediate-data-root: ~/soxspipe-unittests/intermediate/soxs
reduced-data-root: ~/soxspipe-unittests/reduced/soxs

# INTERMEDIATE DATA PRODUCTS CAN CONSUME A LOT OF STORAGE SPACE - BE WARNED
save-intermediate-products: True

logging settings:
    formatters:
        file_style:
            format: '* %(asctime)s - %(name)s - %(levelname)s (%(pathname)s > %(funcName)s > %(lineno)d) - %(message)s  '
            datefmt: '%Y/%m/%d %H:%M:%S'
        console_style:
            format: '* %(asctime)s - %(levelname)s: %(pathname)s:%(funcName)s:%(lineno)d > %(message)s'
            datefmt: '%H:%M:%S'
        html_style:
            format: '<div id="row" class="%(levelname)s"><span class="date">%(asctime)s</span>   <span class="label">file:</span><span class="filename">%(filename)s</span>   <span class="label">method:</span><span class="funcName">%(funcName)s</span>   <span class="label">line#:</span><span class="lineno">%(lineno)d</span> <span class="pathname">%(pathname)s</span>  <div class="right"><span class="message">%(message)s</span><span class="levelname">%(levelname)s</span></div></div>'
            datefmt: '%Y-%m-%d <span class= "time">%H:%M <span class= "seconds">%Ss</span></span>'
    handlers:
        console:
            class: logging.StreamHandler
            level: DEBUG
            formatter: console_style
            stream: ext://sys.stdout
        file:
            class: logging.handlers.GroupWriteRotatingFileHandler
            level: WARNING
            formatter: file_style
            filename: ~/.config/soxspipe/soxspipe.log
            mode: w+
            maxBytes: 102400
            backupCount: 1
    root:
        level: WARNING
        handlers: [file,console]
