From: Jiong Qiu To: vayur@bbso.njit.edu Subject: porgram Hi, vasyl, I attached the program here called morefit_astar.pro IDL> .r morefit_astar IDL> result = morefit(x, y, error, nbin, alpha = alpha, dalpha = dalpha) x: phase (0-180) y: [A*] error: error attached to y (give it as replicate(0.01, nn) in your case) nbin: bin number; try 180, 90, 60, 45, 30 etc. depending on how many data points (nn) you have; nbin is not supposed to be larger than nn. alpha: you have to experiment; the larger alpha, the smoother is the fit; try 1000 first to get a feel dalpha: the decrease in alpha; if alpha = 1000, try dalpha = 100, for example. result: output fitting curve. Attached also is intastar.pro; must compile it before running the above program: IDL> .r intastar IDL> intastar, result result: the result from above program, or anything of the [A*] (vs. lunar phase curve) the program will print the integrated Ae. Good luck! Jiong ---343901288-62780240-988043786=:19480 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="morefit_astar.pro" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="morefit_astar.pro" CWZ1bmN0aW9uIG1vcmVmaXQsIHgsIHksIGVycm9yLCBuYmluLCBhbHBoYSA9 IGFscGhhLCAkDQogICAgICAgICAgICAgICAgIGRhbHBoYSA9IGRhbHBoYSwg Y2hpMiA9IGNoaTIsIG5tYXggPSBubWF4LCBub3ZlcmJvc2UgJA0KICAgICAg ICAgICAgICAgICA9IG5vdmVyYm9zZSwgZml0X3BhcmEgPSBmaXRfcGFyYSwg bm9wbG90ID0gbm9wbG90LCAkDQogICAgICAgICAgICAgICAgIHdlaWdodCA9 IHdlaWdodA0KOysNCjsNCjsgSGlzdG9yeTogUUogaW4gMTk5OSwgZm9yIHJl Z3VsYXJpemF0aW9uIGZpdCBvZiBsdW5hciBwaGFzZSBmdW5jdGlvbg0KOy0N Cg0KOy0tLS0tLS0tLS0tLS0tLSAgaW5pdGlhbGl6ZSBmaXR0aW5nIHBhcmFt ZXRlcnMgIC0tLS0tLS0tLS0tLQ0KaWYgbl9wYXJhbXMoKSBsdCA0IHRoZW4g ZXJyID0gMC4xKnkgZWx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IobnApDQogICAgIGIgPSBmbHRhcnIobnAsIG5wKQ0KICAgICBiMSA9 IGZsdGFycihucCwgbnApDQogICAgIGIoKiwgKikgPSAwDQogICAgIGIxKCos ICopID0gMA0KDQogICAgIGIoMCwgMCkgPSBmYWMgKiA0Lg0KICAgICBiKDEs IDApID0gZmFjICogKC04LikNCiAgICAgYigyLCAwKSA9IGZhYyAqIDQuDQog ICAgIGIoMCwgMSkgPSBmYWMgKiAoLTguKQ0KICAgICBiKDEsIDEpID0gZmFj ICogMTguDQogICAgIGIoMiwgMSkgPSBmYWMgKiAoLTEyLikNCiAgICAgYigz LCAxKSA9IGZhYyAqIDIuDQogICAgIGIoMCwgMikgPSBmYWMgKiA0Lg0KICAg ICBiKDEsIDIpID0gZmFjICogKC0xMi4pDQogICAgIGIoMiwgMikgPSBmYWMg KiAxNC4NCiAgICAgYigzLCAyKSA9IGZhYyAqICgtOC4pDQogICAgIGIoNCwg MikgPSBmYWMgKiAyLg0KICAgICBiKG5wLTEsIG5wLTEpID0gZmFjICogNC4N CiAgICAgYihucC0yLCBucC0xKSA9IGZhYyAqICgtOC4pDQogICAgIGIobnAt MywgbnAtMSkgPSBmYWMgKiA0Lg0KICAgICBiKG5wLTEsIG5wLTIpID0gZmFj ICogKC04LikNCiAgICAgYihucC0yLCBucC0yKSA9IGZhYyAqIDE4Lg0KICAg ICBiKG5wLTMsIG5wLTIpID0gZmFjICogKC0xMi4pDQogICAgIGIobnAtNCwg bnAtMikgPSBmYWMgKiAyLg0KICAgICBiKG5wLTEsIG5wLTMpID0gZmFjICog NC4NCiAgICAgYihucC0yLCBucC0zKSA9IGZhYyAqICgtMTIuKQ0KICAgICBi KG5wLTMsIG5wLTMpID0gZmFjICogMTQuDQogICAgIGIobnAtNCwgbnAtMykg PSBmYWMgKiAoLTguKQ0KICAgICBiKG5wLTUsIG5wLTMpID0gZmFjICogMi4N CiAgIA0KICAgICBmb3Igaz0gMywgbnAgLSA0IGRvIGJlZ2luDQogICAgICAg IGIoay0yLCBrKSA9IGZhYyAqIDIuDQogICAgICAgIGIoay0xLCBrKSA9IGZh YyAqICgtOC4pDQogICAgICAgIGIoaywgaykgICA9IGZhYyAqIDEyLg0KICAg ICAgICBiKGsrMSwgaykgPSBmYWMgKiAoLTguKQ0KICAgICAgICBiKGsrMiwg aykgPSBmYWMgKiAyLiANCiAgICAgZW5kZm9yDQogICAgIA0KICAgICBmb3Ig ayA9IDAsIG5wIC0xIGRvIGIoKiwgaykgPSBiKCosIGspIDsqIGsvMTgwLg0K DQogICAgIHh4ID0gZml4KHgrMC41KQ0KICAgICBmb3IgayA9IDAsIG5wIC0g MSBkbyBiZWdpbg0KICAgICAgICB4ayA9IHhtaW4gKyBkZWxfeCAqIGsNCiAg ICAgICAgeGtsID0gKHhtaW4gKyBkZWxfeCAqIChrLTEpKSA+IHhtaW4NCiAg ICAgICAgeGtnID0gKHhtaW4gKyBkZWxfeCAqIChrKzEpKSA8IHhtYXgNCiAg ICAgICAgY291bnQxID0gMA0KICAgICAgICBjb3VudDIgPSAwDQogICAgICAg IGNvdW50MCA9IDANCiAgICAgICAgeHMxID0geCAmIHhzMiA9IHggJiB4czAg PSB4DQogICAgICAgIGluZGV4MSA9IGludGFycihubikNCiAgICAgICAgaW5k ZXgyID0gaW50YXJyKG5uKQ0KICAgICAgICBpbmRleDAgPSBpbnRhcnIobm4p DQogICAgICAgIDtmb3IgaSA9IDAsIG5uIC0gMSBkbyBiZWdpbg0KICAgICAg ICA7ICAgIGlmICh4KGkpIGd0IHhrIGFuZCB4KGkpIGx0IHhrZykgdGhlbiBi ZWdpbiANCiAgICAgICAgOyAgICAgICAgeHMxKGNvdW50MSkgPSB4KGkpDQog ICAgICAgIDsgICAgICAgIGluZGV4MShjb3VudDEpID0gaQ0KICAgICAgICA7 ICAgICAgICBjb3VudDEgPSBjb3VudDErMQ0KICAgICAgICA7ICAgIGVuZGlm DQogICAgICAgIDsgICAgIGlmICh4KGkpIGx0IHhrIGFuZCB4KGkpIGd0IHhr bCkgdGhlbiBiZWdpbiANCiAgICAgICAgOyAgICAgICAgeHMyKGNvdW50Mikg PSB4KGkpDQogICAgICAgIDsgICAgICAgIGluZGV4Mihjb3VudDIpID0gaQ0K ICAgICAgICA7ICAgICAgICBjb3VudDIgPSBjb3VudDIrMQ0KICAgICAgICA7 ICAgICBlbmRpZg0KICAgICAgICA7ICAgICBpZiB4KGkpIGVxIHhrIHRoZW4g YmVnaW4gDQogICAgICAgIDsgICAgICAgIHhzMChjb3VudDApID0geChpKQ0K ICAgICAgICA7ICAgICAgICBpbmRleDAoY291bnQwKSA9IGkNCiAgICAgICAg OyAgICAgICAgY291bnQwID0gY291bnQwKzENCiAgICAgICAgOyAgICAgZW5k aWYNCiAgICAgICAgO2VuZGZvcg0KICAgICAgICBmb3IgaSA9IDAsIG5uLTEg ZG8gYmVnaW4NCiAgICAgICAgICAgaWYgeHgoaSkgZXEgeGsgdGhlbiBiZWdp bg0KICAgICAgICAgICAgICAgIHhzMChjb3VudDApID0geHgoaSkNCiAgICAg ICAgICAgICAgICBpbmRleDAoY291bnQwKSA9IGkNCiAgICAgICAgICAgICAg ICBjb3VudDAgPSBjb3VudDArMQ0KICAgICAgICAgICBlbmRpZg0KICAgICAg ICBlbmRmb3INCiAgICAgICAgO3ByaW50LCAnY291bnQwJywgY291bnQwLCBj b3VudDEsIGNvdW50Mg0KICAgICAgICBpZiBjb3VudDEgZ3QgMCB0aGVuIHhz MSA9IHhzMSgwOmNvdW50MS0xKQ0KICAgICAgICBpZiBjb3VudDIgZ3QgMCB0 aGVuIHhzMiA9IHhzMigwOmNvdW50Mi0xKQ0KICAgICAgICBpZiBjb3VudDAg Z3QgMCB0aGVuIHhzMCA9IHhzMCgwOmNvdW50MC0xKQ0KICAgICAgICBpZiBj b3VudDEgZ3QgMCB0aGVuIGluZGV4MSA9IGluZGV4MSgwOmNvdW50MS0xKQ0K ICAgICAgICBpZiBjb3VudDIgZ3QgMCB0aGVuIGluZGV4MiA9IGluZGV4Migw OmNvdW50Mi0xKQ0KICAgICAgICBpZiBjb3VudDAgZ3QgMCB0aGVuIGluZGV4 MCA9IGluZGV4MCgwOmNvdW50MC0xKQ0KICAgICAgDQogICAgICAgIGlmIGNv dW50MiBndCAwIHRoZW4gZm9yIGkyID0gMCwgY291bnQyIC0gMSBkbyBiZWdp bg0KICAgICAgICAgIDtwcmludCwgJ2hpIGNvdW50MicNCiAgICAgICAgICB4 ZmFjID0gKHhzMihpMikteGtsKS9kZWxfeCANCiAgICAgICAgICBiMShrLTEs IGspID0gYjEoay0xLCBrKSArIHhmYWMqKDEteGZhYykqMi9lcnIoaW5kZXgy KGkyKSleMg0KICAgICAgICAgIGIxKGssIGspID0gYjEoaywgaykgKyB4ZmFj XjIqMi9lcnIoaW5kZXgyKGkyKSleMg0KICAgICAgICAgIGMoaykgPSBjKGsp ICsgMip5KGluZGV4MihpMikpL2VycihpbmRleDIoaTIpKV4yDQogICAgICAg IGVuZGZvcg0KICAgICAgICBpZiBjb3VudDEgZ3QgMCB0aGVuIGZvciBpMSA9 IDAsIGNvdW50MSAtIDEgZG8gYmVnaW4NCiAgICAgICAgICA7cHJpbnQsICdo aSBjb3VudDEnDQogICAgICAgICAgeGZhYyA9ICh4czEoaTEpLXhrKS9kZWxf eCANCiAgICAgICAgICBiMShrKzEsIGspID0gYjEoaysxLCBrKSArIHhmYWMq KDEteGZhYykqMi9lcnIoaW5kZXgxKGkxKSleMg0KICAgICAgICAgIGIxKGss IGspID0gYjEoaywgaykgKyAoMS14ZmFjKV4yKjIvZXJyKGluZGV4MShpMSkp XjINCiAgICAgICAgICBjKGspID0gYyhrKSArIDIqeShpbmRleDEoaTEpKS9l cnIoaW5kZXgxKGkxKSleMg0KICAgICAgICBlbmRmb3INCiAgICAgICAgaWYg Y291bnQwIGd0IDAgdGhlbiBmb3IgaTAgPSAwLCBjb3VudDAgLSAxIGRvIGJl Z2luDQogICAgICAgICAgYjEoaywgaykgPSBiMShrLCBrKSArIDIvZXJyKGlu ZGV4MChpMCkpXjIgKiB3ZWlnaHQoaW5kZXgwKGkwKSkNCiAgICAgICAgICBj KGspID0gYyhrKSArIDIqeShpbmRleDAoaTApKS9lcnIoaW5kZXgwKGkwKSle Mg0KICAgICAgICBlbmRmb3INCiAgICAgZW5kZm9yDQogICAgIHNjYWxlID0g dHJhY2UoYjEpL3RyYWNlKGIpDQoNCndoaWxlIChudGltZXMgbHQgbm1heCBh bmQgeW4gZXEgJ3knKSBkbyBiZWdpbg0KICAgICBpZiBuX2VsZW1lbnRzKGFs cGhhKSBlcSAwIHRoZW4gYWxwaCA9ICAoIDEgLSBudGltZXMgKiBkYWxwaGEp ICQNCiAgICAgICAgZWxzZSBhbHBoID0gKGFscGhhICAgLSBudGltZXMgKiBk YWxwaGEpDQogICAgIGIyID0gc2NhbGUgKiBhbHBoICogYiArIGIxDQoNCiAg ICAgc3ZkYywgYjIsIHcsIHUsIHYNCiAgICAgcmVzdWx0ID0gc3Zzb2wodSwg dywgdiwgYykgDQogICAgIDtyZXN1bHQgPSBjcmFtZXIoYjIsIGMpDQogICAg IHl5ID0gZmx0YXJyKG5uKQ0KICAgICB5eSgqKSA9IDANCiAgICAgZGR5ID0g eXkNCg0KICAgICBmb3IgaSA9IDAsIG5uIC0gMSBkbyBiZWdpbg0KICAgICAg ICA7cHJpbnQsICdkZWxfeCcsIGRlbF94DQogICAgICAgIGsgPSBmaXgoKHgo aSkteG1pbikvZGVsX3gpDQogICAgICAgIHhrID0geG1pbiArIGRlbF94ICog aw0KICAgICAgICB5eShpKSA9IHJlc3VsdChrKSArIChyZXN1bHQoaysxKS1y ZXN1bHQoaykpIC8gZGVsX3ggKiAoeChpKSAtIHhrKQ0KICAgICBlbmRmb3IN CiAgICAgbGFtYmRhID0gdG90YWwoKHkteXkpXjIvZXJyXjIpLyhubiAtIG5i aW4pDQogICAgIHByaW50LCBubiAtIG5iaW4NCg0KICAgICA7cHJpbnQsICdz Y2FsZSAnLCBzY2FsZSwgJ2FscGggJywgYWxwaCwg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aW5kZ2VuKDE4MSkpDQogICAgICA7b3Bsb3QsIHgoc29ydCh4KSksIHl5 KHNvcnQoeCkpDQogICAgICBvcGxvdCwgeHh4KmRlbF94LCByZXN1bHQsIGNv bG9yID0gMjAwLCB0aGljayA9IDINCiAgICAgIG9wbG90LCB4LCB5eSwgY29s b3IgPSAxNTAsIHBzeW0gPSAyDQogICAgIGVuZGlmDQogICAgIDtobHAsIHJl c3VsdA0KICAgICBpbnRhc3RhciwgcmVzdWx0DQogICAgIHJlYWQsICdNb3Jl KHkvbik/JywgeW4NCmVuZA0KaWYgbnRpbWVzIGVxIG5tYXggdGhlbiBwcmlu dCwgJ01heGltdW0gaXRlcmF0aW9uIHRpbWVzLiAnDQoNCmZpdF9wYXJhID0g e2FscGhhOiBhbHBoLCBkYWxwaGE6IGRhbHBoYSwgc2lnbWE6IHNpZ21hLCAk DQogICAgICAgICAgICBkYXRfZXJyb3I6IGVyciwgZml0X2Vycm9yOiBlcnIx LCB5eTogeXl9DQpyZXR1cm4sIHJlc3VsdA0KDQplbmQNCg== ---343901288-62780240-988043786=:19480 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="intastar.pro" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="intastar.pro" CXBybyBpbnRhc3RhciwgcmVzDQoNCjsgDQo7DQo7DQoNCm5uID0gbl9lbGVt ZW50cyhyZXMpDQptbSA9IDE4MC8obm4tMSkNCnJyID0gc3BsaW5lKGluZGdl bihubikqbW0sIHJlcywgaW5kZ2VuKDE4MSkpDQoNCmFwaGFzZT1hYnMoZmlu ZGdlbigxODEpKQ0KQSA9IC0xLjQ3OTE5NDI2DQpiID0gIDEuNDkyNTg0NTlF LTAyDQpjID0gMS4wOTMxNTMyNkUtMDMNCmQgPSAtMS42NzY0NzIxMUUtMDUN CmUgPSA4LjkzODYzNjA1RS0wOA0KZiA9IC0xLjY2NTU2NDMxRS0xMA0KDQpz aW11PUErQipBUEhBU0UrQypBUEhBU0VeMitEKkFQSEFTRV4zK0UqQVBIQVNF XjQrRipBUEhBU0VeNQ0KY3VyX21vZGVsID0gWzAuZCwgMC5kLCAwLmQsIDUu ZCwgYSwgYiwgYywgZCwgZSwgZl0NCnlmaXRfbW9kZWwgPSBnZW5fZml0KGlu ZGdlbigxODEpLCBjdXJfbW9kZWwpDQoNCnBsb3QsIHJyDQpvcGxvdCwgc2lt dSwgY29sb3IgPSAyMDANCnlfbW9kZWwgPSAoMTBeKC0wLjQqeWZpdF9tb2Rl bCkpDQp5MSA9ICgxMF4oLTAuNCpycikpDQphMSA9IChpbmRnZW4oMTgxKSkq IXBpLzE4MC4NCmxidDEgPSAxLyFwaSAqKHNpbihhYnMoYTEpKSAtICBhYnMo YTEpKmNvcyhhYnMoYTEpKSkqc2luKGFicyhhMSkpDQoNCmludF9tb2RlbCA9 IDQvMy4qdG90YWwoeV9tb2RlbCpsYnQxKiFwaS8xODAuKQ0KaW50MSA9IDQv My4qdG90YWwoeTEqbGJ0MSohcGkvMTgwLikNCg0KcHJpbnQsICdJbnRfbW9k ZWw6ICcsIGludF9tb2RlbCwgICcJSW50X29icy4gOiAnLCBpbnQxDQoNCmVu ZA0KDQo= ---343901288-62780240-988043786=:19480--