/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 10427
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1941.7+7218_weekly_bin855
RA = 295.437, Dec = 72.3101
tmin = 756086401, tmax = 756691201
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository job = True

LAT data source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='60730440', job_status='RUN', time_executed='2024-12-24 04:01:40.380787', time_epoch_executed='1735041700.38' WHERE source_name='4FGL J1941.7+7218' and cadence='weekly' and bin_id='855'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/60730440

Creating custom pfile directory:
/lscratch/kocevski/60730440/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=756086401.0 && nMetStart<756691201.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=756086401.0 && nMetStart<756691201.0' /Data/Flight/Level1/LPA

Retrieving 65 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/60730440/ft1_4FGL_J1941.7+7218_weekly_bin855.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=756086401.0 && nMetStart<756691201.0' /Data/Flight/Level1/LPA

Retrieving 65 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/60730440/ft1_4FGL_J1941.7+7218_weekly_bin855.fits outfile=/lscratch/kocevski/60730440/ft1_filteredMKT_4FGL_J1941.7+7218_weekly_bin855.fits ra=295.437 dec=72.3101 rad=12.0 tmin=756086401.0 tmax=756691201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 3.23
user 2.65
sys 0.25

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/60730440/ft1_filteredMKT_4FGL_J1941.7+7218_weekly_bin855.fits evtable="EVENTS" outfile="/lscratch/kocevski/60730440/ft1_filtered_4FGL_J1941.7+7218_weekly_bin855.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.44
user 0.21
sys 0.14

Number of photons that the gtmktime cut: 2336

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/60730440/ft1_filtered_4FGL_J1941.7+7218_weekly_bin855.fits" evtable="EVENTS" scfile=/lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits sctable="SC_DATA" outfile=/lscratch/kocevski/60730440/ltcube_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Working on file /lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits
.....................!
real 11.87
user 11.20
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/60730440/ft1_filtered_4FGL_J1941.7+7218_weekly_bin855.fits evtable="EVENTS" scfile=/lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits sctable="SC_DATA" expcube=/lscratch/kocevski/60730440/ltcube_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits outfile=/lscratch/kocevski/60730440/expmap_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits irfs="P8R3_SOURCE_V2" evtype="INDEF" srcrad=30.0 nlong=88 nlat=88 nenergies=10 submap=no nlongmin=0 nlongmax=0 nlatmin=0 nlatmax=0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

The exposure maps generated by this tool are meant
to be used for *unbinned* likelihood analysis only.
Do not use them for binned analyses.
Computing the ExposureMap using /lscratch/kocevski/60730440/ltcube_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits
.....................!
real 68.84
user 64.36
sys 3.97

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Extended source FHES J2129.9+5833 in ROI with RadialGaussian spatial model.
Extended source FHES J2208.4+6443 in ROI with RadialGaussian spatial model.
Added 191 point sources and 2 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1941.7+7218 @ 295.437 72.3101

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/60730440/ft1_filtered_4FGL_J1941.7+7218_weekly_bin855.fits scfile=/lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits outfile=/lscratch/kocevski/60730440/cmap_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=295.437 yref=72.3101 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.39
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/60730440/ft1_filtered_4FGL_J1941.7+7218_weekly_bin855.fits scfile=/lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits outfile=/lscratch/kocevski/60730440/cmap_HighResolution_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=295.437 yref=72.3101 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.39
user 0.20
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/60730440/ft1_filtered_4FGL_J1941.7+7218_weekly_bin855.fits evtable="EVENTS" scfile=/lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/60730440/Model_4FGL_J1941.7+7218_weekly_bin855.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source EG_v02
adding source FHES J2129.9+5833
adding source FHES J2208.4+6443
adding source GAL_V02
Working on...
/lscratch/kocevski/60730440/ft1_filtered_4FGL_J1941.7+7218_weekly_bin855.fits.....................!
real 107.20
user 105.74
sys 0.80

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/60730440/ft1_filtered_4FGL_J1941.7+7218_weekly_bin855.fits', '/lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits', expMap='/lscratch/kocevski/60730440/expmap_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits', expCube='/lscratch/kocevski/60730440/ltcube_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/60730440/Model_4FGL_J1941.7+7218_weekly_bin855.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1941.7+7218'

4FGL J1941.7+7218
   Spectrum: PowerLaw
385    Prefactor:  1.111e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
386        Index:  2.770e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
387        Scale:  6.329e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/60730440/ft1_filtered_4FGL_J1941.7+7218_weekly_bin855.fits
Spacecraft file(s): /lscratch/kocevski/60730440/ft2_4FGL_J1941.7+7218_weekly_bin855.fits
Exposure map: /lscratch/kocevski/60730440/expmap_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits
Exposure cube: /lscratch/kocevski/60730440/ltcube_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/60730440/Model_4FGL_J1941.7+7218_weekly_bin855.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 23516.6245332

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 23516.5655751

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12114E-04   1.0000          .0000       .10000E+07
     2 'Prefactor '    22.174       1.0000          .0000       .10000E+07
     3 'norm      '    6.7099       1.0000          .0000       .10000E+07
     4 'norm      '    3.5311       1.0000          .0000       .10000E+07
     5 'norm      '    .20524E-04   1.0000          .0000       .10000E+07
     6 'Prefactor '    .14164E-02   1.0000          .0000       .10000E+07
     7 'Prefactor '    .12778E-02   1.0000          .0000       .10000E+07
     8 'Prefactor '    5.2061       1.0000          .0000       .10000E+07
     9 'Prefactor '    .22778       1.0000          .0000       .10000E+07
    10 'Prefactor '    1.3630       1.0000          .0000       .10000E+07
    11 'norm      '    5.0764       1.0000          .0000       .10000E+07
    12 'norm      '    .15958E-05   1.0000          .0000       .10000E+07
    13 'norm      '    43.162       1.0000          .0000       .10000E+07
    14 'Prefactor '    .13429E-05   1.0000          .0000       .10000E+07
    15 'Prefactor '    5.5287       1.0000          .0000       .10000E+07
    16 'norm      '    4.0897       1.0000          .0000       .10000E+07
    17 'norm      '    .26146E-07   1.0000          .0000       .10000E+07
    18 'norm      '    4.5591       1.0000          .0000       .10000E+07
    19 'norm      '    .19513E-02   1.0000          .0000       .10000E+07
    20 'Prefactor '    43.131       1.0000          .0000       .10000E+07
    21 'norm      '    .46313E-06   1.0000          .0000       .10000E+07
    22 'Prefactor '    15.988       1.0000          .0000       .10000E+07
    23 'norm      '    .12917E-05   1.0000          .0000       .10000E+07
    24 'Prefactor '    2.0472       1.0000          .0000       .10000E+07
    25 'Prefactor '    27.512       1.0000          .0000       .10000E+07
    26 'Normalizat'    1.1617       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .95645       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6400E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   23516.56     FROM MIGRAD    STATUS=CONVERGED    790 CALLS     2543 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        1.7235        .11909E-08** at limit **
   2  Prefactor     22.108        20.102        .23088E-08   -.44628E-04
   3  norm          6.7094        2.2309       -.14409E-08   -.11848E-02
   4  norm          3.5305        .75915       -.43757E-09   -.11378E-02
   5  norm           .0000        2.5938       -.65482E-08** at limit **
   6  Prefactor     .64948E-08    95.121        .36813E-05** at limit **
   7  Prefactor     .79381E-08    80.583       -.31732E-05** at limit **
   8  Prefactor     5.1946        4.3350        .39706E-07   -.35303E-01
   9  Prefactor     .36438E-01    7.8445        .61727E-07** at limit **
  10  Prefactor     .10424E-03    30.915       -.17612E-06** at limit **
  11  norm          5.1090        2.5892        .35403E-07   -.47593E-01
  12  norm          .15876E-07    1.8237       -.25647E-08** at limit **
  13  norm          43.280        13.700       -.70013E-08   -.10655E-04
  14  Prefactor      .0000        2.4056        .12234E-08** at limit **
  15  Prefactor     5.5153        3.6220        .18775E-07   -.39359E-01
  16  norm          4.0880        1.2796        .57709E-09    .20401E-03
  17  norm           .0000        7.1911        .41776E-08** at limit **
  18  norm          4.5570        2.7224       -.15026E-08   -.20934E-02
  19  norm           .0000        14.001       -.32372E-07** at limit **
  20  Prefactor     43.177        16.922       -.66848E-08   -.22340E-03
  21  norm           .0000        1.0227       -.36819E-08** at limit **
  22  Prefactor     16.006        9.8843        .27690E-08   -.83255E-04
  23  norm           .0000        5.1973        .28231E-08** at limit **
  24  Prefactor     2.0470        1.7633        .15387E-09    .31610E-03
  25  Prefactor     27.268        24.879        .12873E-08   -.26980E-04
  26  Normalizat    1.1622        .15416        .15632E-06   -.21675E-03
  27  Prefactor     .95645        .41651E-01   -.50425E-07   -.19289E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Prefactor  = 22.1085
  norm       = 6.70938
  norm       = 3.53047
  norm       = 0
  Prefactor  = 6.4948e-09
  Prefactor  = 7.93809e-09
  Prefactor  = 5.19458
  Prefactor  = 0.0364383
  Prefactor  = 0.000104245
  norm       = 5.10898
  norm       = 1.58762e-08
  norm       = 43.2805
  Prefactor  = 0
  Prefactor  = 5.51533
  norm       = 4.08798
  norm       = 0
  norm       = 4.55701
  norm       = 0
  Prefactor  = 43.1765
  norm       = 0
  Prefactor  = 16.0059
  norm       = 0
  Prefactor  = 2.04697
  Prefactor  = 27.2685
  Normalizat = 1.16215
  Prefactor  = 0.956446
 **********
 **   18 **HESSE 
 **********

 FCN=   23516.56     FROM HESSE     STATUS=OK           518 CALLS     3061 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        1.7406        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     22.108        20.156        .84968E-05   -1.5614    
   3  norm          6.7094        2.2330        .12734E-04   -1.5656    
   4  norm          3.5305        .76214        .57723E-05   -1.5670    
   5  norm           .0000        2.6129        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .64948E-08    95.743        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .79381E-08    81.239        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     5.1946        5.3077        .88066E-04   -1.5662    
   9  Prefactor     .36438E-01    12.263        .10859E-01   -1.5704    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10424E-03    28.346        .29798E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          5.1090        2.9024        .84588E-04   -1.5663    
  12  norm          .15876E-07    1.8518        .73320E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          43.280        13.722        .60890E-05   -1.5576    
  14  Prefactor      .0000        2.4063        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     5.5153        4.3672        .85412E-04   -1.5661    
  16  norm          4.0880        1.2787        .91576E-05   -1.5668    
  17  norm           .0000        7.1913        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          4.5570        2.7200        .18586E-04   -1.5665    
  19  norm           .0000        14.086        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     43.177        16.914        .60912E-05   -1.5577    
  21  norm           .0000        1.0260        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     16.006        9.8752        .10009E-04   -1.5628    
  23  norm           .0000        5.2292        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     2.0470        1.7735        .18364E-04   -1.5679    
  25  Prefactor     27.268        24.922        .76274E-05   -1.5604    
  26  Normalizat    1.1622        .17025        .45869E-03   -.87781    
  27  Prefactor     .95645        .44713E-01    .14645E-03   -.94196    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.38505e-08
Minuit parameter uncertainties:
  1  5.68291e-07
  2  20.1556
  3  2.23304
  4  0.762136
  5  3.45356e-06
  6  0.0015795
  7  0.00160636
  8  5.3077
  9  1.33695
  10  0.10872
  11  2.90236
  12  0.00034289
  13  13.7216
  14  3.51904e-07
  15  4.36723
  16  1.27875
  17  6.38654e-07
  18  2.71999
  19  6.67638e-06
  20  16.9143
  21  7.04156e-08
  22  9.87518
  23  2.5447e-07
  24  1.77348
  25  24.9222
  26  0.170331
  27  0.0447149
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 23516.564769

Extracting fit parameters...

4FGL J1941.7+7218
   Spectrum: PowerLaw
385    Prefactor:  5.515e+00  4.367e+00  0.000e+00  1.000e+06 ( 1.000e-12)
386        Index:  2.770e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
387        Scale:  6.329e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
637    Prefactor:  9.564e-01  4.471e-02  0.000e+00  1.000e+01 ( 1.000e+00)
638        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
639        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
629   Normalization:  1.162e+00  1.703e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.98
Ra Dec: 295.437 72.310
Photon Index (Fixed Index): 2.77 +/- 0.00
Photon Flux (Fixed Index): 5.18e-08 +/- 4.09e-08
Energy Flux (Fixed Index): 1.18e-05 +/- 9.36e-06

TS (Fixed Index): 1.98
Ra Dec: 295.437 72.310
Photon Flux Upper Limit: 1.27310184451e-07 ph cm-2 s-1
Energy Flux Upper Limit: 0.0100622376544 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/60730440/likelihoodResults_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 23515.7708443
delta logL = 0.793924711608

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 23515.7484229
delta logL = 0.816346058469

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.3232       1.0000          .0000       .10000E+07
     2 'Index     '    3.7244       1.0000          .0000       10.000    
     3 'Normalizat'    1.1307       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96074       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6400E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   23515.75     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      293 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.3186        14.485        .67267E-03    .23659E-01
   2  Index         3.7255        2.1388        .20868        .32262E-03
   3  Normalizat    1.1307        .43398E-01    .10472        .50879E-04
   4  Prefactor     .96074        .12669E-01    .33073E-01   -.49337E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.31862
  Index      = 3.7255
  Normalizat = 1.13066
  Prefactor  = 0.960742
 **********
 **   18 **HESSE 
 **********

 FCN=   23515.75     FROM HESSE     STATUS=OK            33 CALLS      326 TOTAL
                     EDM=   .61E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.3186        11.803        .12800E-04   -1.5678    
   2  Index         3.7255        2.7320        .77031E-02   -.25775    
   3  Normalizat    1.1307        .15071        .46416E-03   -.88774    
   4  Prefactor     .96074        .43437E-01    .14615E-03   -.94050    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.14181e-07
Minuit parameter uncertainties:
  1  10.4629
  2  2.90339
  3  0.150769
  4  0.0434386
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 23515.7484219
delta logL = 0.816347095344

Extracting fit parameters...

4FGL J1941.7+7218
   Spectrum: PowerLaw
385    Prefactor:  2.319e+00  1.046e+01  0.000e+00  1.000e+06 ( 1.000e-12)
386        Index:  3.725e+00  2.903e+00  0.000e+00  1.000e+01 (-1.000e+00)
387        Scale:  6.329e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
637    Prefactor:  9.607e-01  4.344e-02  0.000e+00  1.000e+01 ( 1.000e+00)
638        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
639        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
629   Normalization:  1.131e+00  1.508e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.76
Ra Dec: 295.437 72.310
Photon Index (Free Index): 3.73 +/- 2.90
Photon Flux (Free Index): 8.25e-08 +/- 5.08e-08
Energy Flux (Free Index): 1.30e-05 +/- 1.29e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/60730440/cmap_HighResolution_756086401_756691201_4FGL_J1941.7+7218_weekly_bin855.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.01e-02', comment='SUCCESS', photon_flux='5.18e-08', energy_flux2='1.30e-05', photon_flux_error='4.09e-08', dlogl='8.16e-01', energy_flux='1.18e-05', photon_flux2='8.25e-08', job_status='DONE', time_completed='2024-12-24 04:16:06.740292', photon_index_error2='2.90', photon_index2='3.73', ts='1.98', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='1.27e-07', energy_flux_error2='1.29e-05', EG='1.16', time_epoch_completed='1735042566.74', return_code='0', job_id='60730440', GAL2='0.96', EG2='1.13', return_code2='0', energy_flux_error='9.36e-06', photon_flux_error2='5.08e-08', ts2='3.76', photon_index='2.77' WHERE bin_id='855' AND source_name='4FGL J1941.7+7218' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 24 04:16:06 PST 2024

