/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_J1903.2+5540_weekly_bin855
RA = 285.808, Dec = 55.6773
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='60730409', job_status='RUN', time_executed='2024-12-24 04:01:32.776640', time_epoch_executed='1735041692.78' WHERE source_name='4FGL J1903.2+5540' and cadence='weekly' and bin_id='855'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/60730409

Creating custom pfile directory:
/lscratch/kocevski/60730409/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/60730409/ft1_4FGL_J1903.2+5540_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/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/60730409/ft1_4FGL_J1903.2+5540_weekly_bin855.fits outfile=/lscratch/kocevski/60730409/ft1_filteredMKT_4FGL_J1903.2+5540_weekly_bin855.fits ra=285.808 dec=55.6773 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 2.69
user 2.41
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/60730409/ft2_4FGL_J1903.2+5540_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/60730409/ft1_filteredMKT_4FGL_J1903.2+5540_weekly_bin855.fits evtable="EVENTS" outfile="/lscratch/kocevski/60730409/ft1_filtered_4FGL_J1903.2+5540_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.39
user 0.18
sys 0.15

Number of photons that the gtmktime cut: 1661

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/60730409/ft1_filtered_4FGL_J1903.2+5540_weekly_bin855.fits" evtable="EVENTS" scfile=/lscratch/kocevski/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits sctable="SC_DATA" outfile=/lscratch/kocevski/60730409/ltcube_756086401_756691201_4FGL_J1903.2+5540_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/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits
.....................!
real 10.24
user 9.79
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/60730409/ft1_filtered_4FGL_J1903.2+5540_weekly_bin855.fits evtable="EVENTS" scfile=/lscratch/kocevski/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits sctable="SC_DATA" expcube=/lscratch/kocevski/60730409/ltcube_756086401_756691201_4FGL_J1903.2+5540_weekly_bin855.fits outfile=/lscratch/kocevski/60730409/expmap_756086401_756691201_4FGL_J1903.2+5540_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/60730409/ltcube_756086401_756691201_4FGL_J1903.2+5540_weekly_bin855.fits
.....................!
real 60.33
user 56.61
sys 3.29

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 HB 21 in ROI with RadialDisk spatial model.
Extended source gamma Cygni in ROI with RadialDisk spatial model.
Extended source Cygnus Cocoon in ROI with RadialGaussian spatial model.
Extended source FHES J2129.9+5833 in ROI with RadialGaussian spatial model.
Added 195 point sources and 4 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 J1903.2+5540 @ 285.808 55.6773

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/60730409/ft1_filtered_4FGL_J1903.2+5540_weekly_bin855.fits scfile=/lscratch/kocevski/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits outfile=/lscratch/kocevski/60730409/cmap_756086401_756691201_4FGL_J1903.2+5540_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=285.808 yref=55.6773 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.41
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/60730409/ft1_filtered_4FGL_J1903.2+5540_weekly_bin855.fits scfile=/lscratch/kocevski/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits outfile=/lscratch/kocevski/60730409/cmap_HighResolution_756086401_756691201_4FGL_J1903.2+5540_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=285.808 yref=55.6773 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.40
user 0.21
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/60730409/ft1_filtered_4FGL_J1903.2+5540_weekly_bin855.fits evtable="EVENTS" scfile=/lscratch/kocevski/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/60730409/Model_4FGL_J1903.2+5540_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 Cygnus Cocoon
adding source EG_v02
adding source FHES J2129.9+5833
adding source GAL_V02
adding source HB 21
adding source gamma Cygni
Working on...
/lscratch/kocevski/60730409/ft1_filtered_4FGL_J1903.2+5540_weekly_bin855.fits.....................!
real 63.52
user 62.02
sys 0.96

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/60730409/ft1_filtered_4FGL_J1903.2+5540_weekly_bin855.fits', '/lscratch/kocevski/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits', expMap='/lscratch/kocevski/60730409/expmap_756086401_756691201_4FGL_J1903.2+5540_weekly_bin855.fits', expCube='/lscratch/kocevski/60730409/ltcube_756086401_756691201_4FGL_J1903.2+5540_weekly_bin855.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/60730409/Model_4FGL_J1903.2+5540_weekly_bin855.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1903.2+5540'

4FGL J1903.2+5540
   Spectrum: LogParabola
334         norm:  2.734e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
335        alpha:  1.817e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
336         beta:  8.376e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
337           Eb:  1.263e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/60730409/ft1_filtered_4FGL_J1903.2+5540_weekly_bin855.fits
Spacecraft file(s): /lscratch/kocevski/60730409/ft2_4FGL_J1903.2+5540_weekly_bin855.fits
Exposure map: /lscratch/kocevski/60730409/expmap_756086401_756691201_4FGL_J1903.2+5540_weekly_bin855.fits
Exposure cube: /lscratch/kocevski/60730409/ltcube_756086401_756691201_4FGL_J1903.2+5540_weekly_bin855.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/60730409/Model_4FGL_J1903.2+5540_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) = 16838.3964859

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .42982E-02   1.0000          .0000       .10000E+07
     2 'Prefactor '    .80491E-06   1.0000          .0000       .10000E+07
     3 'Prefactor '    .55398E-04   1.0000          .0000       .10000E+07
     4 'Prefactor '    9.2962       1.0000          .0000       .10000E+07
     5 'norm      '    23.253       1.0000          .0000       .10000E+07
     6 'norm      '    5.7382       1.0000          .0000       .10000E+07
     7 'norm      '    10.961       1.0000          .0000       .10000E+07
     8 'Prefactor '    .58842E-08   1.0000          .0000       .10000E+07
     9 'Prefactor '    .48856       1.0000          .0000       .10000E+07
    10 'norm      '    5.2654       1.0000          .0000       .10000E+07
    11 'Prefactor '    1.2705       1.0000          .0000       .10000E+07
    12 'norm      '    1.1733       1.0000          .0000       .10000E+07
    13 'norm      '    .15447E-01   1.0000          .0000       .10000E+07
    14 'norm      '    41.381       1.0000          .0000       .10000E+07
    15 'Prefactor '    .52736E-07   1.0000          .0000       .10000E+07
    16 'Prefactor '    .11931E-04   1.0000          .0000       .10000E+07
    17 'norm      '    3.9928       1.0000          .0000       .10000E+07
    18 'norm      '    .31892E-02   1.0000          .0000       .10000E+07
    19 'Normalizat'    1.1283       1.0000         .10000E-01   10.000    
    20 'Prefactor '    .96465       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6780E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   16837.44     FROM MIGRAD    STATUS=CONVERGED    190 CALLS     1267 TOTAL
                     EDM=   .16E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        58.549       -.29299E-07** at limit **
   2  Prefactor      .0000        10.233        .18697E-07** at limit **
   3  Prefactor     .55511E-10    16.305        .18042E-07** at limit **
   4  Prefactor     16.535        201.80        .22389E-06   -.66843E-05
   5  norm          23.316        9.3723       -.66821E-08    .18838E-03
   6  norm          5.8151        7.3012        .17803E-07    .36525E-03
   7  norm          10.887        8.6000        .10008E-07    .25274E-03
   8  Prefactor      .0000        3.4522        .87538E-08** at limit **
   9  Prefactor     .66613E-08    666.26       -.18050E-05** at limit **
  10  norm          5.2637        2.8115        .47122E-07   -.77215E-03
  11  Prefactor     1.2720        1.3636        .57269E-08   -.10463E-03
  12  norm          1.1738        1.1465        .39811E-08    .81110E-04
  13  norm          .26727E-01    73.571        .14975E-05** at limit **
  14  norm          41.466        13.429        .39525E-07   -.90706E-03
  15  Prefactor      .0000        2.7428       -.55727E-08** at limit **
  16  Prefactor      .0000        25.202       -.89095E-07** at limit **
  17  norm          3.9941        1.3062        .10750E-07    .18959E-02
  18  norm          .27756E-09    44.821        .45664E-07** at limit **
  19  Normalizat    1.1274        .17805        .34213E-06    .36903E-04
  20  Prefactor     .96472        .69006E-01    .57034E-07    .72222E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 5.55112e-11
  Prefactor  = 16.5349
  norm       = 23.316
  norm       = 5.81515
  norm       = 10.8869
  Prefactor  = 0
  Prefactor  = 6.66134e-09
  norm       = 5.26371
  Prefactor  = 1.27195
  norm       = 1.17376
  norm       = 0.0267268
  norm       = 41.4656
  Prefactor  = 0
  Prefactor  = 0
  norm       = 3.99414
  norm       = 2.77556e-10
  Normalizat = 1.12739
  Prefactor  = 0.964719
 **********
 **   18 **HESSE 
 **********

 FCN=   16837.44     FROM HESSE     STATUS=OK           345 CALLS     1612 TOTAL
                     EDM=   .71E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        57.920        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor      .0000        10.221        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .55511E-10    16.179        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     16.535        194.89        .32846E-03   -1.5627    
   5  norm          23.316        9.3186        .20743E-03   -1.5611    
   6  norm          5.8151        7.3026        .41907E-03   -1.5660    
   7  norm          10.887        8.6090        .30236E-03   -1.5642    
   8  Prefactor      .0000        3.4562        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .66613E-08    33.910        .23277E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          5.2637        2.8542        .43779E-03   -1.5662    
  11  Prefactor     1.2720        1.3882        .98672E-03   -1.5685    
  12  norm          1.1738        1.1470        .10579E-03   -1.5686    
  13  norm          .26727E-01    1.6359        .82998E-02   -1.5711    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          41.466        12.899        .15547E-03   -1.5579    
  15  Prefactor      .0000        2.7473        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        25.177        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.9941        1.3076        .50449E-03   -1.5668    
  18  norm          .27756E-09    43.925        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    1.1274        .15878        .89203E-01   -.88877    
  20  Prefactor     .96472        .61341E-01    .45824E-01   -.93915    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.09098e-10
Minuit parameter uncertainties:
  1  7.4478e-05
  2  1.39396e-06
  3  4.90825e-05
  4  113.538
  5  9.31864
  6  7.30259
  7  8.60899
  8  2.89305e-06
  9  0.000952517
  10  2.85418
  11  1.38816
  12  1.14703
  13  0.418201
  14  12.8989
  15  3.1472e-06
  16  9.45404e-06
  17  1.30758
  18  0.000210753
  19  0.158849
  20  0.0613451
Done.

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

Extracting fit parameters...

4FGL J1903.2+5540
   Spectrum: LogParabola
334         norm:  1.174e+00  1.147e+00  0.000e+00  1.000e+06 ( 1.000e-12)
335        alpha:  1.817e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
336         beta:  8.376e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
337           Eb:  1.263e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
667    Prefactor:  9.647e-01  6.135e-02  0.000e+00  1.000e+01 ( 1.000e+00)
668        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
669        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
663   Normalization:  1.127e+00  1.588e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.08
Ra Dec: 285.808 55.677
Photon Index (Fixed Index): 1.82 +/- 0.00
Photon Flux (Fixed Index): 1.12e-08 +/- 1.10e-08
Energy Flux (Fixed Index): 1.07e-05 +/- 1.04e-05

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) = 16836.7772049
delta logL = 0.661831749097

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 16836.7762442
delta logL = 0.662792368341

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .42899       1.0000          .0000       .10000E+07
     2 'alpha     '    .85255       1.0000          .0000       5.0000    
     3 'Normalizat'    1.1338       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96467       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6780E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   16836.78     FROM MIGRAD    STATUS=FAILED       102 CALLS      294 TOTAL
                     EDM=   .55E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .42886        .85982        .13586E-03   -.17760    
   2  alpha         .85233        .86097        .31090E-02   -.35455E-05
   3  Normalizat    1.1338        .16838        .39409E-03    .69236E-06
   4  Prefactor     .96464        .68341E-01    .17058E-03    .15995E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   16836.78     FROM SIMPLEX   STATUS=UNCHANGED     74 CALLS      368 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .42886        .85982        .39826E-05   -1.5695    
   2  alpha         .85233        .86097        .14783E-02   -.71958    
   3  Normalizat    1.1338        .16838        .20996E-03   -.88672    
   4  Prefactor     .96464        .68341E-01    .86806E-04   -.93918    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   16836.78     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      397 TOTAL
                     EDM=   .71E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .42886        .78340        .27171E-04   -.70607E-02
   2  alpha         .85233        .78880        .62181E-03    .73133E-07
   3  Normalizat    1.1338        .16846        .15763E-04    .57697E-06
   4  Prefactor     .96464        .68375E-01    .68232E-05    .13330E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 0.428862
  alpha      = 0.852327
  Normalizat = 1.13385
  Prefactor  = 0.964641
 **********
 **   18 **HESSE 
 **********

 FCN=   16836.78     FROM HESSE     STATUS=OK            25 CALLS      422 TOTAL
                     EDM=   .36E-13    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .42886        .77006        .54343E-05   -1.5695    
   2  alpha         .85233        .77598        .24872E-04   -.71958    
   3  Normalizat    1.1338        .16893        .31527E-05   -.88672    
   4  Prefactor     .96464        .68563E-01    .13646E-05   -.93918    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.60478e-14
Minuit parameter uncertainties:
  1  0.770062
  2  0.799893
  3  0.169011
  4  0.068569
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) = 16836.7762441
delta logL = 0.662792539686

Extracting fit parameters...

4FGL J1903.2+5540
   Spectrum: LogParabola
334         norm:  4.289e-01  7.701e-01  0.000e+00  1.000e+06 ( 1.000e-12)
335        alpha:  8.523e-01  7.999e-01  0.000e+00  5.000e+00 ( 1.000e+00)
336         beta:  8.376e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
337           Eb:  1.263e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
667    Prefactor:  9.646e-01  6.857e-02  0.000e+00  1.000e+01 ( 1.000e+00)
668        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
669        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
663   Normalization:  1.134e+00  1.690e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.39
Ra Dec: 285.808 55.677
Photon Index (Free Index): 0.85 +/- 0.80
Photon Flux (Free Index): 2.98e-09 +/- 3.79e-09
Energy Flux (Free Index): 3.31e-05 +/- 4.72e-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/60730409/cmap_HighResolution_756086401_756691201_4FGL_J1903.2+5540_weekly_bin855.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.12e-08', energy_flux2='3.31e-05', photon_flux_error='1.10e-08', dlogl='6.63e-01', energy_flux='1.07e-05', photon_flux2='2.98e-09', job_status='DONE', time_completed='2024-12-24 04:08:09.036240', photon_index_error2='0.80', photon_index2='0.85', ts='4.08', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', energy_flux_error2='4.72e-05', EG='1.13', time_epoch_completed='1735042089.04', return_code='0', job_id='60730409', GAL2='0.96', EG2='1.13', return_code2='0', energy_flux_error='1.04e-05', photon_flux_error2='3.79e-09', ts2='5.39', photon_index='1.82' WHERE bin_id='855' AND source_name='4FGL J1903.2+5540' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 24 04:08:09 PST 2024

