Beispiel #1
0
def mainfunc(signal, var, target, weighting=True, displayWVT=True, epsilon=10):
    binlist, init_generators, init_scalelengths = cc_accretion(
        signal, var, target)
    binlist, diflist = iteration_func(target,
                                      signal,
                                      var,
                                      init_generators,
                                      init_scalelengths,
                                      epsilon,
                                      displaywvt=displayWVT)
    wvt, ston = functions.generate_wvt2(binlist, signal, var, displayWVT)
    vwvt = functions.generate_wvt(binlist, var)
    if displayWVT:
        main.maketargetscatter(target, binlist, signal, var)
    #blockout(target,wvt,ston)
    return binlist, diflist
Beispiel #2
0
def mainfunc(signal, var, target, weighting=True, displayWVT=True, epsilon=10):
    ## this is the most important function
    ## first we do bin accretion. then iteration. the wvt and vwvt is not necessary here but im scared to remove it
    binlist, init_generators, init_scalelengths = bin_accretion.cc_accretion(
        signal, var, target)
    binlist, diflist = wvt_iteration.iteration_func(target,
                                                    signal,
                                                    var,
                                                    init_generators,
                                                    init_scalelengths,
                                                    epsilon,
                                                    displaywvt=displayWVT)

    if displayWVT:
        wvt, ston = functions.generate_wvt2(binlist, signal, var, displayWVT)
        vwvt = functions.generate_wvt(binlist, var)
        maketargetscatter(target, binlist, signal, var)
    #blockout(target,wvt,ston)
    return binlist, diflist
Beispiel #3
0
            target = targlist[m]

            subfolder = "target" + str(target)
            #main.saveston(wscxlist[i],siglist[i],varlist[i],sourcelist[i],objlist[i],subfolder="unbinned")
            eps = 0.1
            binlist, diflist = mainfunc(signal,
                                        var,
                                        target,
                                        displayWVT=False,
                                        epsilon=eps)

            #main.saveblockoutfits(targlist[m],binlist,wscxlist[i],siglist[i],varlist[i],objlist[i],sourcelist[i],subfolder=subfolder)
            #wvt,ston=functions.generate_wvt2(binlist,siglist[i],varlist[i])
            wvt, ston = functions.generate_wvt3(binlist, signal, var,
                                                np.full(len(binlist), 1))
            vwvt = functions.generate_wvt(binlist, var)
            main.saveiteratedfits(target,
                                  wcsx,
                                  wvt,
                                  vwvt,
                                  objname,
                                  sourcedir,
                                  subfolder=subfolder)
            functions.convergence(eps,
                                  diflist,
                                  sourcedir,
                                  objname,
                                  subfolder=subfolder)
            main.saveblockoutfits(target,
                                  ston,
                                  wcsx,